mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-14 17:07:44 +00:00
dfa73c7cc1
darcs-hash:20061025202836-ac50b-682015e2f5830a85ff520e89b0a951ca9d2913dc.gz
15 lines
307 B
Fish
15 lines
307 B
Fish
#
|
|
# This function deletes a character from the commandline if it is
|
|
# non-empty, and exits the shell otherwise. Implementing this
|
|
# functionality has been a longstanding request from various
|
|
# fish-users.
|
|
#
|
|
|
|
function delete-or-exit
|
|
if test (commandline)
|
|
commandline -f delete-char
|
|
else
|
|
exit
|
|
end
|
|
end
|
|
|