aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/trap.fish
diff options
context:
space:
mode:
authorGravatar Christopher Nilsson <christopher@otherchirps.net>2010-11-12 02:07:14 +1100
committerGravatar Christopher Nilsson <christopher@otherchirps.net>2010-11-12 02:07:14 +1100
commit1b0ce336693243054580e07b4514c598257d4422 (patch)
tree71af04f124f2853c0018e3c7d85e942591658910 /share/functions/trap.fish
parent0cf2a1eb3382a6384b61a6edd577d387b9b62766 (diff)
parentb9b6e867df9718ec17d36f8cd6771cd9a337c46b (diff)
Merged changes from codemonkey and grissiom branches
Conflicts: kill.c seq.in
Diffstat (limited to 'share/functions/trap.fish')
-rw-r--r--share/functions/trap.fish20
1 files changed, 10 insertions, 10 deletions
diff --git a/share/functions/trap.fish b/share/functions/trap.fish
index 4a08af9d..d88bdd4e 100644
--- a/share/functions/trap.fish
+++ b/share/functions/trap.fish
@@ -13,18 +13,18 @@ function __trap_switch
switch $argv[1]
case EXIT
echo --on-exit %self
-
+
case '*'
echo --on-signal $argv[1]
- end
+ end
end
function trap -d 'Perform an action when the shell recives a signal'
set -l mode
- set -l cmd
- set -l sig
+ set -l cmd
+ set -l sig
set -l shortopt
set -l longopt
@@ -47,13 +47,13 @@ function trap -d 'Perform an action when the shell recives a signal'
case -h --help
__fish_print_help trap
return 0
-
+
case -p --print
set mode print
-
+
case -l --list-signals
set mode list
-
+
case --
set -e opt[1]
break
@@ -87,7 +87,7 @@ function trap -d 'Perform an action when the shell recives a signal'
for i in $opt
set sig (__trap_translate_signal $i)
if test $sig
- functions -e __trap_handler_$sig
+ functions -e __trap_handler_$sig
end
end
@@ -108,7 +108,7 @@ function trap -d 'Perform an action when the shell recives a signal'
end
case print
- set -l names
+ set -l names
if count $opt >/dev/null
set names $opt
@@ -130,7 +130,7 @@ function trap -d 'Perform an action when the shell recives a signal'
case list
kill -l
-
+
end
end