2022-09-07 10:46:26 +00:00
|
|
|
# try new completion generation of click first
|
|
|
|
set -l comps (_PIPENV_COMPLETE=fish_source pipenv 2>/dev/null)
|
|
|
|
if test -z "$comps" || string match -q 'Usage:*' -- $comps
|
|
|
|
# fall back to older click-completion used in prior versions
|
|
|
|
set comps (_PIPENV_COMPLETE=source-fish pipenv --completion 2>/dev/null)
|
2017-10-05 04:15:41 +00:00
|
|
|
end
|
2020-10-25 18:00:58 +00:00
|
|
|
|
2022-09-07 10:46:26 +00:00
|
|
|
set -q comps[1] && printf %s\n $comps | source
|
|
|
|
|
|
|
|
|
|
|
|
# manual workaround for pipenv run command completion until this is supported by the built-in mechanism
|
2020-10-25 18:00:58 +00:00
|
|
|
complete -c pipenv -n "__fish_seen_subcommand_from run" -a "(__fish_complete_subcommand --fcs-skip=2)" -x
|