travel/admin/node_modules/omelette/example/githubber-coffee

25 lines
641 B
Plaintext
Raw Normal View History

2024-06-24 11:28:18 +08:00
#!/usr/bin/env coffee
fs = require "fs"
omelette = require "../coffee/omelette"
complete = omelette "githubber-coffee <action> <user> <repo>"
complete.on "action", -> @reply ["star", "clone", "update", "push"]
complete.on "user", (action)-> @reply fs.readdirSync "/Users/"
complete.on "repo", (user)-> @reply [
"http://github.com/#{user}/helloworld"
"http://github.com/#{user}/blabla"
]
complete.init();
# If you want to setup, you can use `omeletteInstance.setupShellInitFile()` function.
if ~process.argv.indexOf '--setup'
complete.setupShellInitFile()
console.log "Your program's default workflow."
console.log process.argv