cli
cli copied to clipboard
Complete file name when there are no completion matches
A common behavior for inaccurate/incomplete/auto-generated completion scripts is to complete file names when there are no completion matches, like the shells default behavior.
To enable for Bash, you simply add -o default
to the complete
call in the completion script. For Zsh, you can add something like this after trying to add the completions (There might be a better way to replicate this behavior in Zsh, but I didn't find any):
if [[ $compstate[nmatches] -eq 0 && $words[$CURRENT] != -* ]]; then
_files
fi
Thank you sir!
This issue or PR has been automatically marked as stale because it has not had recent activity. Please add a comment bumping this if you're still interested in it's resolution! Thanks for your help, please let us know if you need anything else.
Closing this as it has become stale.
Works with latest release.