mirror of
https://github.com/spf13/cobra
synced 2024-11-04 21:07:19 +00:00
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:
parent
b3f29e98e6
commit
c6399cd398
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue