Commit a574b51 1 parent dbbc151 commit a574b51 Copy full SHA for a574b51
File tree 1 file changed +13
-4
lines changed
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
18
18
fi
19
19
20
20
local si=" $IFS "
21
- IFS=$' \n ' COMPREPLY=($( COMP_CWORD=" $cword " \
21
+ if ! IFS=$' \n ' COMPREPLY=($( COMP_CWORD=" $cword " \
22
22
COMP_LINE=" $COMP_LINE " \
23
23
COMP_POINT=" $COMP_POINT " \
24
24
npm completion -- " ${words[@]} " \
25
- 2> /dev/null) ) || return $?
25
+ 2> /dev/null) ); then
26
+ local ret=$?
27
+ IFS=" $si "
28
+ return $ret
29
+ fi
26
30
IFS=" $si "
27
31
if type __ltrim_colon_completions & > /dev/null; then
28
32
__ltrim_colon_completions " ${words[cword]} "
@@ -49,11 +53,16 @@ elif type compctl &>/dev/null; then
49
53
read -l line
50
54
read -ln point
51
55
si=" $IFS "
52
- IFS=$' \n ' reply=($( COMP_CWORD=" $cword " \
56
+ if ! IFS=$' \n ' reply=($( COMP_CWORD=" $cword " \
53
57
COMP_LINE=" $line " \
54
58
COMP_POINT=" $point " \
55
59
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
57
66
IFS=" $si "
58
67
}
59
68
compctl -K _npm_completion npm
You can’t perform that action at this time.
0 commit comments