From ac16ef71277fafb4975d9e31be0dae2fffac1764 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 18 Sep 2025 16:48:03 -0500 Subject: wow. this worked. thanks Alex Flint --- argv.go | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'argv.go') diff --git a/argv.go b/argv.go index e1d5222..426b130 100644 --- a/argv.go +++ b/argv.go @@ -149,22 +149,12 @@ forge -- a tool to manage lots of git repos. forge includes a GUI and TUI. ` } -// -// handles shell autocomplete -// - -// arg0 should be the last entry -// arg1 should be the 'current' thing the user is typing -// it should be empty if the user doesn't have a partial string to match +// handles shell autocomplete func DoAutoComplete(pb *prep.Auto) { switch pb.Cmd { case "checkout": pb.Autocomplete2("devel master user") case "clean": - // me.pp.WriteHelp(os.Stderr) - // me.pp.WriteUsageForSubcommand(os.Stderr, me.pp.SubcommandNames()...) - // me.pp.WriteHelpForSubcommand(os.Stderr, me.pp.SubcommandNames()...) - // me.pp.WriteHelpForSubcommand(os.Stderr, "clean") fmt.Println("--force verify --repo") case "commit": pb.Autocomplete2("--all") @@ -200,12 +190,16 @@ func DoAutoComplete(pb *prep.Auto) { if pb.Cmd == "" { pb.Autocomplete2("help list checkout clean commit dirty fetch gui normal merge patch pull tag --gui") } else { - pb.Autocomplete2("todoGenericCmd") + pb.Autocomplete2("list checkout clean commit dirty normal merge") } } os.Exit(0) } +func (args) Appname() string { + return ARGNAME +} + func ifBlank(arg string) bool { if arg == "''" { // if empty, the user has not typed something -- cgit v1.2.3