summaryrefslogtreecommitdiff
path: root/argv.parseOsArgs.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-25 09:03:31 -0500
committerJeff Carr <[email protected]>2025-10-25 09:03:31 -0500
commit221839190ba296268926589dd50416c3e7cac24a (patch)
treed2931fdefa42495bafad86b44c79e07da1508c3b /argv.parseOsArgs.go
parentb95f2cab06e5de8fec71b0b991777f5d5cb1fa90 (diff)
something farther along?
Diffstat (limited to 'argv.parseOsArgs.go')
-rw-r--r--argv.parseOsArgs.go32
1 files changed, 3 insertions, 29 deletions
diff --git a/argv.parseOsArgs.go b/argv.parseOsArgs.go
index 89750c9..d28e7e7 100644
--- a/argv.parseOsArgs.go
+++ b/argv.parseOsArgs.go
@@ -69,33 +69,11 @@ func (pb *Argv) parseOsArgs() {
return
}
- // set debug flag if --argvdebug is passed
- for _, s := range os.Args {
- if s == "--argvdebug" {
- me.debug = true
- }
- // deprecate
- if s == "--autodebug" {
- me.debug = true
- }
- }
-
- /*
- // wtf is this. I've forgotten. todo: figure this out
- if len(os.Args) > 1 && os.Args[1] == pb.AppInfo.APPNAME {
- me.isAuto = true
- // parts := strings.Split(os.Getenv("COMP_LINE"), " ")
- me.debug = true
- pb.Debugf("MATCH Partial os.Args=%v COMP_LINE=%v", os.Args, os.Getenv("COMP_LINE"))
- os.Exit(0)
- }
- */
-
// print the version and exit
if len(os.Args) > 1 && os.Args[1] == "--version" {
// if binary defined buildtime() then process standard version output here
doVersion(pb)
- os.Exit(0)
+ saveAndExit()
}
if os.Args[1] != "--auto-complete" {
@@ -134,7 +112,8 @@ func (pb *Argv) parseOsArgs() {
// pb.Argv = os.Args[4:]
for _, s := range os.Args[4:] {
- if s == "--autodebug" {
+ if s == "--argvdebug" {
+ me.debug = true
continue
}
tmp := strings.Trim(pb.Partial, "'")
@@ -144,10 +123,5 @@ func (pb *Argv) parseOsArgs() {
}
pb.Real = append(pb.Real, s)
}
-
- // this is dumb
- for _, s := range pb.Real {
- pb.Goargs = append(pb.Goargs, s)
- }
return
}