From b8cafe1bd3b0dbb8fd33bea4c806541ac7932e66 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 9 Sep 2025 03:17:02 -0500 Subject: [PATCH] NEVER DO THIS. adding ' around that var made things break --- bash.go | 2 +- gui.go | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bash.go b/bash.go index 908cde7..118a635 100644 --- a/bash.go +++ b/bash.go @@ -96,7 +96,7 @@ func makeBashCompletionText(argname string) string { out += fmt.Sprintf(" all=${COMP_WORDS[@]}\n") out += fmt.Sprintf("\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(" # this compares the command line input from the user\n") out += fmt.Sprintf(" # to whatever strings we output\n") diff --git a/gui.go b/gui.go index 73109fb..d731b3f 100644 --- a/gui.go +++ b/gui.go @@ -3,6 +3,8 @@ package prep // initializes logging and command line options import ( + "os" + "go.wit.com/dev/alexflint/arg" "go.wit.com/gui" ) @@ -53,6 +55,10 @@ func postMustParse(s string) string { } 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) return gui.PreInit(postMustParse)