From c6399cd398905db8208d06e30525513f53aaca98 Mon Sep 17 00:00:00 2001 From: Tamer TAS Date: Sat, 2 Jan 2016 08:11:35 +0200 Subject: [PATCH] Use readline's default filename completion if completion fails If the `compspec` generates no matches it uses bash filename completion instead. --- bash_completions.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bash_completions.go b/bash_completions.go index 848da9c..01c874d 100644 --- a/bash_completions.go +++ b/bash_completions.go @@ -235,9 +235,9 @@ func postscript(out *bytes.Buffer, name string) { `, name) fmt.Fprintf(out, `if [[ $(type -t compopt) = "builtin" ]]; then - complete -F __start_%s %s + complete -o default -F __start_%s %s else - complete -o nospace -F __start_%s %s + complete -o default -o nospace -F __start_%s %s fi `, name, name, name, name)