Use new set_color features for __fish_cancel_commandline

We still apparently need to rely on tput for 'el'.
This commit is contained in:
Aaron Gyes 2016-12-31 06:12:05 -08:00
parent b22842a52f
commit 1fb92b6f8c

View File

@ -9,8 +9,8 @@ function __fish_cancel_commandline
#
# Set reverse fg/bg color mode, output ^C, restore normal mode, clear to EOL (to erase any
# autosuggestion).
if command -v tput >/dev/null
echo -ns (tput smso; or tput so) "^C" (tput rmso; or tput se) (tput el; or tput ce)
if command -sq tput
echo -ns (set_color -r) "^C" (set_color normal) (tput el; or tput ce)
else
echo -n "^C"
end