mirror of
https://github.com/cupcakearmy/dotfiles.git
synced 2024-10-31 20:44:12 +01:00
23 lines
617 B
Fish
23 lines
617 B
Fish
###-begin-pnpm-completion-###
|
|
function _pnpm_completion
|
|
set cmd (commandline -o)
|
|
set cursor (commandline -C)
|
|
set words (count $cmd)
|
|
|
|
set completions (eval env DEBUG=\"" \"" COMP_CWORD=\""$words\"" COMP_LINE=\""$cmd \"" COMP_POINT=\""$cursor\"" pnpm completion -- $cmd)
|
|
|
|
if [ "$completions" = "__tabtab_complete_files__" ]
|
|
set -l matches (commandline -ct)*
|
|
if [ -n "$matches" ]
|
|
__fish_complete_path (commandline -ct)
|
|
end
|
|
else
|
|
for completion in $completions
|
|
echo -e $completion
|
|
end
|
|
end
|
|
end
|
|
|
|
complete -f -d 'pnpm' -c pnpm -a "(_pnpm_completion)"
|
|
###-end-pnpm-completion-###
|