From bb1955ccf96d127226af3587c1b05b9e8bdd97fb Mon Sep 17 00:00:00 2001 From: Andrey Mishchenko Date: Wed, 8 Dec 2021 11:28:40 -0500 Subject: [PATCH] Remove delete-or-exit function, which has a C++ implementation --- doc_src/cmds/bind.rst | 3 --- doc_src/tutorial.rst | 2 +- share/functions/delete-or-exit.fish | 22 ---------------------- 3 files changed, 1 insertion(+), 26 deletions(-) delete mode 100644 share/functions/delete-or-exit.fish diff --git a/doc_src/cmds/bind.rst b/doc_src/cmds/bind.rst index 9aaac5fa7..970f37295 100644 --- a/doc_src/cmds/bind.rst +++ b/doc_src/cmds/bind.rst @@ -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 diff --git a/doc_src/tutorial.rst b/doc_src/tutorial.rst index 001c3e0b2..4fdc05718 100644 --- a/doc_src/tutorial.rst +++ b/doc_src/tutorial.rst @@ -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 ` 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 diff --git a/share/functions/delete-or-exit.fish b/share/functions/delete-or-exit.fish deleted file mode 100644 index 70c94f140..000000000 --- a/share/functions/delete-or-exit.fish +++ /dev/null @@ -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