diff options
| author | Jeff Carr <[email protected]> | 2025-09-09 02:30:38 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-09 02:33:08 -0500 |
| commit | 4827be1d2ab4a37fc45a31116df2f109e1a8390e (patch) | |
| tree | fc504474185f6acb277baa21c82c494f879b8d4d /main.go | |
| parent | f1c1ca950c0a2868dc7feb6f86a0b48254d95a94 (diff) | |
cleaner argv autocomplete
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 15 |
1 files changed, 3 insertions, 12 deletions
@@ -8,8 +8,7 @@ import ( "time" "go.wit.com/dev/alexflint/arg" - "go.wit.com/gui" - "go.wit.com/lib/fhelp" + "go.wit.com/lib/gui/prep" "go.wit.com/lib/protobuf/forgepb" "go.wit.com/log" ) @@ -28,18 +27,10 @@ var LIBDIR string = "/var/lib/forged/" // need to deprecate this func main() { me = new(mainType) - gui.InitArg() + prep.Bash(ARGNAME, argv.DoAutoComplete) // todo: this line should be: prep.Bash(argv) + me.myGui = prep.Gui() // prepares the GUI package for go-args me.pp = arg.MustParse(&argv) - if argv.Bash { - fhelp.DoBash(ARGNAME) - os.Exit(0) - } - if len(argv.BashAuto) != 0 { - argv.doBashAuto() - os.Exit(0) - } - if argv.Hostname != "" { HOSTNAME = argv.Hostname } |
