NEVER DO THIS. adding ' around that var made things break
This commit is contained in:
parent
4d2f24f64e
commit
b8cafe1bd3
2
bash.go
2
bash.go
|
@ -96,7 +96,7 @@ func makeBashCompletionText(argname string) string {
|
||||||
out += fmt.Sprintf(" all=${COMP_WORDS[@]}\n")
|
out += fmt.Sprintf(" all=${COMP_WORDS[@]}\n")
|
||||||
out += fmt.Sprintf("\n")
|
out += fmt.Sprintf("\n")
|
||||||
out += fmt.Sprintf(" # this is where we generate the go-arg output\n")
|
out += fmt.Sprintf(" # this is where we generate the go-arg output\n")
|
||||||
out += fmt.Sprintf(" GOARGS=$(%s --auto-complete \\'$prev\\' \\'$cur\\' $all)\n", argname)
|
out += fmt.Sprintf(" GOARGS=$(%s --auto-complete $prev \\'$cur\\' $all)\n", argname)
|
||||||
out += fmt.Sprintf("\n")
|
out += fmt.Sprintf("\n")
|
||||||
out += fmt.Sprintf(" # this compares the command line input from the user\n")
|
out += fmt.Sprintf(" # this compares the command line input from the user\n")
|
||||||
out += fmt.Sprintf(" # to whatever strings we output\n")
|
out += fmt.Sprintf(" # to whatever strings we output\n")
|
||||||
|
|
6
gui.go
6
gui.go
|
@ -3,6 +3,8 @@ package prep
|
||||||
// initializes logging and command line options
|
// initializes logging and command line options
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
|
|
||||||
"go.wit.com/dev/alexflint/arg"
|
"go.wit.com/dev/alexflint/arg"
|
||||||
"go.wit.com/gui"
|
"go.wit.com/gui"
|
||||||
)
|
)
|
||||||
|
@ -53,6 +55,10 @@ func postMustParse(s string) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Gui() *gui.Node {
|
func Gui() *gui.Node {
|
||||||
|
if len(os.Args) > 1 && os.Args[1] == "--gui-check-plugin" {
|
||||||
|
gui.TestPluginAndExitNew(os.Args[2])
|
||||||
|
os.Exit(0)
|
||||||
|
}
|
||||||
arg.Register(&argGui)
|
arg.Register(&argGui)
|
||||||
|
|
||||||
return gui.PreInit(postMustParse)
|
return gui.PreInit(postMustParse)
|
||||||
|
|
Loading…
Reference in New Issue