forked from fish-shell/fish-shell
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
provide a better experience when user presses \cC
Fixes fish-shell#2904
- Loading branch information
1 parent
fff3a69
commit ebd5e11
Showing
3 changed files
with
18 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# This is meant to be bound to something like \cC. | ||
function __fish_cancel_commandline | ||
set -l cmd (commandline) | ||
if test -n "$cmd" | ||
commandline -C 1000000 | ||
echo (set_color -b bryellow black)"^C"(set_color normal) | ||
for i in (seq (commandline -L)) | ||
echo "" | ||
end | ||
commandline "" | ||
commandline -f repaint | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters