aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/delete-or-exit.fish
diff options
context:
space:
mode:
authorGravatar liljencrantz <liljencrantz@gmail.com>2007-09-26 19:01:59 +1000
committerGravatar liljencrantz <liljencrantz@gmail.com>2007-09-26 19:01:59 +1000
commit093cb71f91744bd4fe2b85ead3216a54f255e09c (patch)
tree0ae03212ed0183c6a31439a69d9181100971d810 /share/functions/delete-or-exit.fish
parentdf4fdf33c435317ab84ecc0fbd4580760991765a (diff)
Fix bug in exit code that made the exit builtin exit even if there where running jobs if called directly from the commandline
darcs-hash:20070926090159-75c98-2760c6c24e21fd14711c9ce3bef1b0890b495d65.gz
Diffstat (limited to 'share/functions/delete-or-exit.fish')
-rw-r--r--share/functions/delete-or-exit.fish13
1 files changed, 10 insertions, 3 deletions
diff --git a/share/functions/delete-or-exit.fish b/share/functions/delete-or-exit.fish
index d82bf2ac..771a6bc3 100644
--- a/share/functions/delete-or-exit.fish
+++ b/share/functions/delete-or-exit.fish
@@ -6,11 +6,18 @@
#
function delete-or-exit
+
set -l cmd (commandline)
- if test "$cmd"
- commandline -f delete-char
- else
+
+ switch $cmd
+
+ case ''
exit 0
+
+ case '*'
+ commandline -f delete-char
+
end
+
end