liusuyi
2024-07-06 0ab014198a8b4e40fa26da394373a4bcdb571148
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/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