fix(bash complete)
This commit is contained in:
1 parent
6155ebf062
commit
d1558438cf
18 files changed
+305
-261
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/codegangsta/cli"
|
||||
"isp-ctl/command"
|
||||
"isp-ctl/flag"
|
||||
@@ -41,6 +42,11 @@ func initCommands() {
|
||||
command.Delete(),
|
||||
command.Schema(),
|
||||
}
|
||||
app.BashComplete = func(context *cli.Context) {
|
||||
for _, command := range app.Commands {
|
||||
fmt.Println(command.Name)
|
||||
}
|
||||
}
|
||||
|
||||
err := app.Run(os.Args)
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user