blob: 6b6b8904cfb7e90b843d0a5aa4fad533d3c515f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#compdef pnpm
###-begin-pnpm-completion-###
if type compdef &>/dev/null; then
_pnpm_completion () {
local reply
local si=$IFS
IFS=$'\n' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" SHELL=zsh pnpm completion-server -- "${words[@]}"))
IFS=$si
if [ "$reply" = "__tabtab_complete_files__" ]; then
_files
else
_describe 'values' reply
fi
}
# When called by the Zsh completion system, this will end with
# "loadautofunc" when initially autoloaded and "shfunc" later on, otherwise,
# the script was "eval"-ed so use "compdef" to register it with the
# completion system
if [[ $zsh_eval_context == *func ]]; then
_pnpm_completion "$@"
else
compdef _pnpm_completion pnpm
fi
fi
###-end-pnpm-completion-###
# pnpm homedir
export PNPM_HOME="/home/work/.local/share/pnpm"
case ":$PATH:" in
*":$PNPM_HOME:"*) ;;
*) export PATH="$PNPM_HOME:$PATH" ;;
esac
|