File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -18,11 +18,15 @@ if type complete &>/dev/null; then
1818 fi
1919
2020 local si=" $IFS "
21- IFS=$' \n ' COMPREPLY=($( COMP_CWORD=" $cword " \
21+ if ! IFS=$' \n ' COMPREPLY=($( COMP_CWORD=" $cword " \
2222 COMP_LINE=" $COMP_LINE " \
2323 COMP_POINT=" $COMP_POINT " \
2424 npm completion -- " ${words[@]} " \
25- 2> /dev/null) ) || return $?
25+ 2> /dev/null) ); then
26+ local ret=$?
27+ IFS=" $si "
28+ return $ret
29+ fi
2630 IFS=" $si "
2731 if type __ltrim_colon_completions & > /dev/null; then
2832 __ltrim_colon_completions " ${words[cword]} "
@@ -49,11 +53,16 @@ elif type compctl &>/dev/null; then
4953 read -l line
5054 read -ln point
5155 si=" $IFS "
52- IFS=$' \n ' reply=($( COMP_CWORD=" $cword " \
56+ if ! IFS=$' \n ' reply=($( COMP_CWORD=" $cword " \
5357 COMP_LINE=" $line " \
5458 COMP_POINT=" $point " \
5559 npm completion -- " ${words[@]} " \
56- 2> /dev/null) ) || return $?
60+ 2> /dev/null) ); then
61+
62+ local ret=$?
63+ IFS=" $si "
64+ return $ret
65+ fi
5766 IFS=" $si "
5867 }
5968 compctl -K _npm_completion npm
You can’t perform that action at this time.
0 commit comments