Skip to content

Commit

Permalink
feat: list files when there is no completion on zsh (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
renancaraujo committed Nov 22, 2022
1 parent 615ef3d commit ca273fc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/src/install/shell_completion_configuration.dart
Expand Up @@ -74,7 +74,11 @@ if type compdef &>/dev/null; then
IFS=\$'\n' reply=(\$(COMP_CWORD="\$((CURRENT-1))" COMP_LINE="\$BUFFER" COMP_POINT="\$CURSOR" $rootCommand completion -- "\${words[@]}"))
IFS=\$si
_describe 'values' reply
if [[ -z "\$reply" ]]; then
_path_files
else
_describe 'values' reply
fi
}
compdef _${rootCommand}_completion $rootCommand
fi
Expand Down
6 changes: 5 additions & 1 deletion test/src/install/shell_completion_configuration_test.dart
Expand Up @@ -36,7 +36,11 @@ if type compdef &>/dev/null; then
IFS=\$'\n' reply=(\$(COMP_CWORD="\$((CURRENT-1))" COMP_LINE="\$BUFFER" COMP_POINT="\$CURSOR" very_good completion -- "\${words[@]}"))
IFS=\$si
_describe 'values' reply
if [[ -z "\$reply" ]]; then
_path_files
else
_describe 'values' reply
fi
}
compdef _very_good_completion very_good
fi
Expand Down

0 comments on commit ca273fc

Please sign in to comment.