Skip to content

Commit

Permalink
Make meta-backspace less aggressive about what it deletes
Browse files Browse the repository at this point in the history
  • Loading branch information
ridiculousfish committed Dec 21, 2012
1 parent 2ba92f9 commit 6b35250
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions input.cpp
Expand Up @@ -117,6 +117,7 @@ static const wchar_t * const name_arr[] =
L"kill-whole-line",
L"kill-word",
L"backward-kill-word",
L"backward-kill-path-component",
L"dump-functions",
L"history-token-search-backward",
L"history-token-search-forward",
Expand Down Expand Up @@ -200,6 +201,7 @@ static const wchar_t code_arr[] =
R_KILL_WHOLE_LINE,
R_KILL_WORD,
R_BACKWARD_KILL_WORD,
R_BACKWARD_KILL_PATH_COMPONENT,
R_DUMP_FUNCTIONS,
R_HISTORY_TOKEN_SEARCH_BACKWARD,
R_HISTORY_TOKEN_SEARCH_FORWARD,
Expand Down
2 changes: 1 addition & 1 deletion share/functions/fish_default_key_bindings.fish
Expand Up @@ -84,7 +84,7 @@ function fish_default_key_bindings -d "Default (Emacs-like) key bindings for fis
bind \cc 'commandline ""'
bind \cu backward-kill-line
bind \ed kill-word
bind \cw backward-kill-word
bind \cw backward-kill-path-component
bind \ed 'set -l cmd (commandline); if test -z "$cmd"; dirh; commandline -f repaint; else; commandline -f kill-word; end'
bind \cd delete-or-exit

Expand Down

1 comment on commit 6b35250

@faho
Copy link
Member

@faho faho commented on 6b35250 Sep 21, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ridiculousfish: I'm not sure I understand this - it affects "\cw" i.e. Ctrl+w bindings, not meta-backspace (and I can't get meta-backspace to do anything, neither in fish nor in bash).

\cw is also bound to backward-kill-word above, which matches the documentation, but then re-bound here.

Please sign in to comment.