mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-30 14:53:11 +00:00
80759ee03f
darcs-hash:20061112114544-ac50b-d5fd61b3819715057caba2dd8b48119df080edd1.gz
15 lines
309 B
Fish
15 lines
309 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 0
|
|
end
|
|
end
|
|
|