fix(zsh_autocomplete): List files on tab with no completion options

This will simply list the files in the current directory if there are no
auto-completion options available.

With this change, the zsh auto-completion will align with the functionality in
the bash auto-completion file provided.

New functionality: https://asciinema.org/a/EAYRIEVGTGNSS2gCGwSJ4Zw1i

Old functionality: https://asciinema.org/a/BfOZz4BHUGwjXMFptbmDHZocH

Signed-off-by: Ole Petter <ole.orhagen@northern.tech>
This commit is contained in:
Ole Petter 2020-05-03 12:10:39 +02:00
parent 464c868816
commit b27d899434
No known key found for this signature in database
GPG Key ID: A7100375167A7B21

View File

@ -13,6 +13,8 @@ _cli_zsh_autocomplete() {
if [[ "${opts[1]}" != "" ]]; then
_describe 'values' opts
else
_files
fi
return