This commit is contained in:
Niccolo Borgioli
2021-11-05 17:33:48 +01:00
parent 4fef43437d
commit 612cb17f9a
4 changed files with 41 additions and 10 deletions

View File

@@ -0,0 +1,4 @@
# tabtab source for pnpm package
# uninstall by removing these lines
[ -f ~/.config/tabtab/fish/pnpm.fish ]; and . ~/.config/tabtab/fish/pnpm.fish; or true

View File

@@ -0,0 +1,22 @@
###-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-###