Closed kbd closed 6 years ago
Under zsh, you run the following code:
if [[ "$(basename ${(%):-%x})" != "..." ]]; then
Under a login shell, the shell executable begins with a dash (eg. '-zsh'), so basename fails with:
basename
$ eval "$(pipenv --completion)" basename: illegal option -- z usage: basename string [suffix] basename [-a] [-s suffix] string [...]
(pipenv uses click_completion internally.) To fix this, you can do:
pipenv
click_completion
basename -- ${(%):-%x}
Adding -- stops anything starting with - from being parsed as an argument.
--
-
looks good to me. Could you submit a pull request with that fix?
fixed in #10
Under zsh, you run the following code:
Under a login shell, the shell executable begins with a dash (eg. '-zsh'), so
basename
fails with:(
pipenv
usesclick_completion
internally.) To fix this, you can do:Adding
--
stops anything starting with-
from being parsed as an argument.