diff options
| author | Jeff Carr <[email protected]> | 2025-10-03 06:49:33 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-03 06:49:33 -0500 |
| commit | 4574971b222384f3f0f1a5f41ce03ac7e495d682 (patch) | |
| tree | b1aba2cd3bb699cc170c252a0531459a981847a0 /argv.go | |
| parent | 322ec42ce6da80915a80ed36f02bc6a15c238fb2 (diff) | |
more argv options
Diffstat (limited to 'argv.go')
| -rw-r--r-- | argv.go | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -12,6 +12,7 @@ import ( "os" "go.wit.com/lib/debugger" + "go.wit.com/lib/fhelp" "go.wit.com/lib/gui/logsettings" "go.wit.com/lib/gui/prep" "go.wit.com/log" @@ -29,6 +30,7 @@ type args struct { Test *EmptyCmd `arg:"subcommand:test" help:"test build everything first"` Clone *EmptyCmd `arg:"subcommand:repomap-clone" help:"go-clone from a gowebd repomap"` Rdate *EmptyCmd `arg:"subcommand:rdate" help:"standard rdate"` + Zoo *EmptyCmd `arg:"subcommand:zoo" help:"WIT Private Cloud info"` Upgrade *UpgradeCmd `arg:"subcommand:upgrade" help:"apt upgrade packages installed from mirrors.wit.com"` RepoMap string `arg:"--repomap" help:"location of the repomap"` Release bool `arg:"--release" help:"use go-deb --release"` @@ -104,8 +106,19 @@ func (args) Appname() string { } func (a args) DoAutoComplete(pb *prep.Auto) { + base := []string{"--version", "build", "debian", "upgrade", "git", "--force"} + if _, err := fhelp.CheckCmd("zood"); err == nil { + base = append(base, "zoo") + } + if _, err := fhelp.CheckCmd("forge"); err == nil { + base = append(base, "forge") + } + if areSuperuser() { + base = append(base, "upgrade") + base = append(base, "rdate") + } if pb.Cmd == "" { - pb.Autocomplete3([]string{"--version", "push", "build", "debian", "upgrade", "macos", "git", "rdate", "--force"}) + pb.Autocomplete3(base) } else { pb.SubCommand(pb.Goargs...) } |
