From ca8c337c941c46f4fa40336a1979b5d364a7509b Mon Sep 17 00:00:00 2001 From: axel Date: Wed, 13 Dec 2006 04:18:41 +1000 Subject: [PATCH] Drop unneeded '--' when using set builtin in the trap function darcs-hash:20061212181841-ac50b-dd1fd50b80c6d3c759c123832bc6334613529ee6.gz --- share/functions/trap.fish | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/share/functions/trap.fish b/share/functions/trap.fish index 5cd91e29d..ee29aa784 100644 --- a/share/functions/trap.fish +++ b/share/functions/trap.fish @@ -85,7 +85,7 @@ function trap -d 'Perform an action when the shell recives a signal' switch $mode case clear for i in $opt - set -- sig (__trap_translate_signal $i) + set sig (__trap_translate_signal $i) if test $sig functions -e __trap_handler_$sig end @@ -97,8 +97,8 @@ function trap -d 'Perform an action when the shell recives a signal' for i in $opt - set -l -- sig (__trap_translate_signal $i) - set -- sw (__trap_switch $sig) + set -l sig (__trap_translate_signal $i) + set sw (__trap_switch $sig) if test $sig eval "function __trap_handler_$sig $sw; $cmd; end" @@ -111,14 +111,14 @@ function trap -d 'Perform an action when the shell recives a signal' set -l names if count $opt >/dev/null - set -- names $opt + set names $opt else - set -- names (functions -na|sgrep "^__trap_handler_"|sed -e 's/__trap_handler_//' ) + set names (functions -na|sgrep "^__trap_handler_"|sed -e 's/__trap_handler_//' ) end for i in $names - set -- sig (__trap_translate_signal $i) + set sig (__trap_translate_signal $i) if test sig functions __trap_handler_$i