File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ function trap -d 'Perform an action when the shell receives a signal'
54
54
case clear
55
55
for i in $argv
56
56
set sig (__trap_translate_signal $i )
57
- if test $sig
57
+ if test -n " $sig "
58
58
functions -e __trap_handler_$sig
59
59
end
60
60
end
@@ -67,7 +67,7 @@ function trap -d 'Perform an action when the shell receives a signal'
67
67
set -l sig (__trap_translate_signal $i )
68
68
set sw (__trap_switch $sig )
69
69
70
- if test $sig
70
+ if test -n " $sig "
71
71
echo " function __trap_handler_$sig $sw ; $cmd ; end" | source
72
72
else
73
73
return 1
@@ -85,7 +85,7 @@ function trap -d 'Perform an action when the shell receives a signal'
85
85
for i in $names
86
86
set sig (__trap_translate_signal $i )
87
87
88
- if test sig
88
+ if test -n " $ sig"
89
89
functions __trap_handler_$i
90
90
else
91
91
return 1
You can’t perform that action at this time.
0 commit comments