2005-09-20 13:31:55 +00:00
|
|
|
|
|
|
|
#
|
2006-02-08 10:20:43 +00:00
|
|
|
# Print the current working directory in a shortened form. This
|
2006-01-28 10:25:51 +00:00
|
|
|
# function is used by the default prompt command.
|
2005-09-20 13:31:55 +00:00
|
|
|
#
|
|
|
|
|
2005-09-20 23:42:00 +00:00
|
|
|
function prevd-or-backward-word --key-binding
|
|
|
|
if test -z (commandline)
|
|
|
|
prevd
|
|
|
|
else
|
|
|
|
commandline -f backward-word
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
function nextd-or-forward-word --key-binding
|
|
|
|
if test -z (commandline)
|
|
|
|
nextd
|
|
|
|
else
|
|
|
|
commandline -f forward-word
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
|
2005-09-20 23:57:18 +00:00
|
|
|
function delete-or-exit --key-binding
|
2005-09-20 23:42:00 +00:00
|
|
|
if test (commandline)
|
|
|
|
commandline -f delete-char
|
|
|
|
else
|
|
|
|
exit
|
|
|
|
end
|
|
|
|
end
|
2005-12-07 15:57:17 +00:00
|
|
|
|