summaryrefslogtreecommitdiff
path: root/bash.new.go
diff options
context:
space:
mode:
Diffstat (limited to 'bash.new.go')
-rw-r--r--bash.new.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/bash.new.go b/bash.new.go
index 631e5b4..fcee961 100644
--- a/bash.new.go
+++ b/bash.new.go
@@ -28,7 +28,7 @@ func doBash2(argname string) {
filename := filepath.Join(homeDir, ".local/share/bash-completion/completions", argname)
if shell.Exists(filename) {
log.Println(filename, "file already exists")
- os.Exit(0)
+ // os.Exit(0)
}
basedir, _ := filepath.Split(filename)
if !shell.IsDir(basedir) {
@@ -215,7 +215,7 @@ func parseArgv(argname string) *Auto {
}
// also try to parse/send cur (?)
-func Bash2(argname string, autocomplete func(*Auto)) {
+func Bash2(argname string, autocomplete func(*Auto)) *Auto {
newauto := parseArgv(argname)
if newauto.SetupAuto {
// --bash was passed. try to configure bash-completion
@@ -239,4 +239,5 @@ func Bash2(argname string, autocomplete func(*Auto)) {
}
arg.Register(&argBash)
+ return newauto
}