Use readline's default filename completion if completion fails

If the `compspec` generates no matches it uses bash filename completion instead.
This commit is contained in:
Tamer TAS 2016-01-02 08:11:35 +02:00
parent b3f29e98e6
commit c6399cd398

View File

@ -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)