Make command run by __fish_echo output to TTY for color detection

Without this, e.g. Alt-L shows the directory entries one per line and
without colors.

Closes #11888
This commit is contained in:
Xiretza
2025-10-05 14:46:25 +00:00
committed by Johannes Altmanninger
parent 74ba4e9a98
commit b7fabb11ac
2 changed files with 3 additions and 1 deletions

View File

@@ -10,7 +10,8 @@ set -l erase_line "$(
function __fish_echo --inherit-variable erase_line --description 'run the given command after the current commandline and redraw the prompt'
set -l line (commandline --line)
string >&2 repeat -N \n --count=(math (commandline | count) - $line + 1)
printf %s\n $erase_line($argv) >&2
printf %s $erase_line >&2
$argv >&2
string >&2 repeat -N \n --count=(math (count (fish_prompt)) - 1)
string >&2 repeat -N \n --count=(math $line - 1)
commandline -f repaint