2016-04-14 02:46:18 +00:00
|
|
|
# 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
|
2017-04-11 03:28:26 +00:00
|
|
|
echo -ns (set_color $fish_color_cancel) "^C" (set_color normal)
|
2016-12-31 14:12:05 +00:00
|
|
|
if command -sq tput
|
2017-04-11 03:28:26 +00:00
|
|
|
# Clear to EOL (to erase any autosuggestion).
|
|
|
|
echo -n (tput el; or tput ce)
|
2016-09-01 14:30:50 +00:00
|
|
|
end
|
2016-04-14 02:46:18 +00:00
|
|
|
for i in (seq (commandline -L))
|
|
|
|
echo ""
|
|
|
|
end
|
|
|
|
commandline ""
|
|
|
|
commandline -f repaint
|
|
|
|
end
|
|
|
|
end
|