mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Fix ^C at commandline indicator for FreeBSD
This didn't work on platforms where tput exists but can never accept terminfo names. This includes the current versions of FreeBSD - it used to do both, now it doesn't. So, fall back to the old termcap names by (tput smso; or tput so). Add check for the tput program before we even try.
This commit is contained in:
parent
2345bea5c1
commit
8ca3adaa91
1 changed files with 5 additions and 1 deletions
|
@ -9,7 +9,11 @@ function __fish_cancel_commandline
|
|||
#
|
||||
# Set reverse fg/bg color mode, output ^C, restore normal mode, clear to EOL (to erase any
|
||||
# autosuggestion).
|
||||
echo -n (tput smso)"^C"(tput rmso)(tput el)
|
||||
if command -v tput
|
||||
echo -ns (tput smso; or tput so) "^C" (tput rmso; or tput se) (tput el; or tput ce)
|
||||
else
|
||||
echo -n "^C"
|
||||
end
|
||||
for i in (seq (commandline -L))
|
||||
echo ""
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue