mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 13:23:09 +00:00
Remove delete-or-exit function, which has a C++ implementation
This commit is contained in:
parent
fb73a4b2e2
commit
bb1955ccf9
3 changed files with 1 additions and 26 deletions
|
@ -294,9 +294,6 @@ The following functions are included as normal functions, but are particularly u
|
|||
``edit_command_buffer``
|
||||
open the visual editor (controlled by the :envvar:`VISUAL` or :envvar:`EDITOR` environment variables) with the current command-line contents
|
||||
|
||||
``delete-or-exit``
|
||||
quit the shell if the current command-line is empty, or delete the character under the cursor if not
|
||||
|
||||
``fish_clipboard_copy``
|
||||
copy the current selection to the system clipboard
|
||||
|
||||
|
|
|
@ -583,7 +583,7 @@ Unlike other shells, fish does not have aliases or special prompt syntax. Functi
|
|||
You can list the names of all functions with the :ref:`functions <cmd-functions>` builtin (note the plural!). fish starts out with a number of functions::
|
||||
|
||||
> functions
|
||||
N_, abbr, alias, bg, cd, cdh, contains_seq, delete-or-exit, dirh, dirs, disown, down-or-search, edit_command_buffer, export, fg, fish_add_path, fish_breakpoint_prompt, fish_clipboard_copy, fish_clipboard_paste, fish_config, fish_default_key_bindings, fish_default_mode_prompt, fish_git_prompt, fish_hg_prompt, fish_hybrid_key_bindings, fish_indent, fish_is_root_user, fish_job_summary, fish_key_reader, fish_md5, fish_mode_prompt, fish_npm_helper, fish_opt, fish_print_git_action, fish_print_hg_root, fish_prompt, fish_sigtrap_handler, fish_svn_prompt, fish_title, fish_update_completions, fish_vcs_prompt, fish_vi_cursor, fish_vi_key_bindings, funced, funcsave, grep, help, history, hostname, isatty, kill, la, ll, ls, man, nextd, open, popd, prevd, prompt_hostname, prompt_pwd, psub, pushd, realpath, seq, setenv, suspend, trap, type, umask, up-or-search, vared, wait
|
||||
N_, abbr, alias, bg, cd, cdh, contains_seq, dirh, dirs, disown, down-or-search, edit_command_buffer, export, fg, fish_add_path, fish_breakpoint_prompt, fish_clipboard_copy, fish_clipboard_paste, fish_config, fish_default_key_bindings, fish_default_mode_prompt, fish_git_prompt, fish_hg_prompt, fish_hybrid_key_bindings, fish_indent, fish_is_root_user, fish_job_summary, fish_key_reader, fish_md5, fish_mode_prompt, fish_npm_helper, fish_opt, fish_print_git_action, fish_print_hg_root, fish_prompt, fish_sigtrap_handler, fish_svn_prompt, fish_title, fish_update_completions, fish_vcs_prompt, fish_vi_cursor, fish_vi_key_bindings, funced, funcsave, grep, help, history, hostname, isatty, kill, la, ll, ls, man, nextd, open, popd, prevd, prompt_hostname, prompt_pwd, psub, pushd, realpath, seq, setenv, suspend, trap, type, umask, up-or-search, vared, wait
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
#
|
||||
# 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
|
||||
|
||||
set -l cmd (commandline)
|
||||
|
||||
switch "$cmd"
|
||||
|
||||
case ''
|
||||
exit 0
|
||||
|
||||
case '*'
|
||||
commandline -f delete-char
|
||||
|
||||
end
|
||||
|
||||
end
|
Loading…
Reference in a new issue