diff options
| author | Jeff Carr <[email protected]> | 2025-02-07 08:58:24 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-07 08:58:24 -0600 |
| commit | 9da0b6973450c082e1771d523c8b2becabf25862 (patch) | |
| tree | 00dc6fb4730c8ef4f139ee79616afa8295297673 /main.go | |
| parent | 8130ffd25b3a4b43eb1d0e43afeb6dd27064fa6a (diff) | |
add bash autocomplete
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -14,7 +14,10 @@ import ( var VERSION string var BUILDTIME string -var golangVersion string = "1.21" +// used for shell auto completion +var ARGNAME string = "go-mod-clean" + +var golangVersion string = "1.22" var pp *arg.Parser var forge *forgepb.Forge @@ -27,6 +30,14 @@ func main() { log.Info("go-mod-clean version", VERSION, "built on", BUILDTIME) pp = arg.MustParse(&argv) + if argv.Bash { + argv.doBash() + os.Exit(0) + } + if len(argv.BashAuto) != 0 { + argv.doBashAuto() + os.Exit(0) + } // load the ~/.config/forge/ config // this lets you configure repos you have read/write access too forge = forgepb.InitPB() // todo: make this scan only if pb file not found |
