diff options
Diffstat (limited to 'argvAutoshell.go')
| -rw-r--r-- | argvAutoshell.go | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/argvAutoshell.go b/argvAutoshell.go index a1a426f..912d799 100644 --- a/argvAutoshell.go +++ b/argvAutoshell.go @@ -30,7 +30,7 @@ func (args) doBashAuto() { default: if argv.BashAuto[0] == ARGNAME { // list the subcommands here - fmt.Println("playback add") + fmt.Println("add format playback") } } os.Exit(0) @@ -51,43 +51,10 @@ func (args) doBashHelp() { return } fmt.Fprintln(os.Stderr, "") - fmt.Fprintln(os.Stderr, "hello world") + fmt.Fprintln(os.Stderr, "something went wrong with the GO args package") fmt.Fprintln(os.Stderr, "") } -/* -// complete -F forge --bash forge -func (args) doBash() { - fmt.Println("# add this in your bashrc:") - fmt.Println("") - fmt.Println("# todo: add this to go-arg as a 'hidden' go-arg option --bash") - fmt.Println("#") - fmt.Println("# todo: can this output work/parse with:") - fmt.Println("# complete -C `" + ARGNAME + " --bash` " + ARGNAME) - fmt.Println("") - fmt.Println("_" + ARGNAME + "_complete()") - fmt.Println("{") - fmt.Println(" # sets local to this func vars") - fmt.Println(" local cur prev all") - fmt.Println(" cur=${COMP_WORDS[COMP_CWORD]}") - fmt.Println(" prev=${COMP_WORDS[COMP_CWORD-1]}") - fmt.Println(" all=${COMP_WORDS[@]}") - fmt.Println("") - fmt.Println(" # this is where we generate the go-arg output") - fmt.Println(" GOARGS=$(" + ARGNAME + " --auto-complete $prev \\'$cur\\' $all)") - fmt.Println("") - fmt.Println(" # this compares the command line input from the user") - fmt.Println(" # to whatever strings we output") - fmt.Println(" COMPREPLY=( $(compgen -W \"$GOARGS\" -- $cur) ) # THIS WORKS") - fmt.Println(" return 0") - fmt.Println("}") - fmt.Println("complete -F _" + ARGNAME + "_complete " + ARGNAME) - fmt.Println("") - fmt.Println("# copy and paste the above into your bash shell should work") - os.Exit(0) -} -*/ - // complete -F forge --bash forge func (args) doBash() { fmt.Println("# add this in your bashrc:") |
