mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
parent
f034d8ba3a
commit
8558561650
2 changed files with 18 additions and 17 deletions
|
@ -17,12 +17,24 @@ function __fish_default_command_not_found_handler
|
||||||
echo "fish: Unknown command '$argv'" >&2
|
echo "fish: Unknown command '$argv'" >&2
|
||||||
end
|
end
|
||||||
|
|
||||||
#
|
if status --is-interactive
|
||||||
# Hook up the default as the principal command_not_found handler
|
# Enable truecolor/24-bit support for select terminals
|
||||||
# in case we are not interactive
|
if not set -q NVIM_LISTEN_ADDRESS # Neovim will swallow the 24bit sequences, rendering text white
|
||||||
#
|
and begin
|
||||||
status -i; or function __fish_command_not_found_handler --on-event fish_command_not_found
|
set -q KONSOLE_PROFILE_NAME # KDE's konsole
|
||||||
__fish_default_command_not_found_handler $argv
|
or string match -q -- "*:*" $ITERM_SESSION_ID # Supporting versions of iTerm2 will include a colon here
|
||||||
|
or string match -q -- "st-*" $TERM # suckless' st
|
||||||
|
or test "$VTE_VERSION" -ge 3600 # Should be all gtk3-vte-based terms after version 3.6.0.0
|
||||||
|
or test "$COLORTERM" = truecolor -o "$COLORTERM" = 24bit # slang expects this
|
||||||
|
end
|
||||||
|
set -g fish_term24bit 1
|
||||||
|
end
|
||||||
|
else
|
||||||
|
# Hook up the default as the principal command_not_found handler
|
||||||
|
# in case we are not interactive
|
||||||
|
function __fish_command_not_found_handler --on-event fish_command_not_found
|
||||||
|
__fish_default_command_not_found_handler $argv
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -287,15 +287,4 @@ function __fish_config_interactive -d "Initializations that should be performed
|
||||||
fish_fallback_prompt
|
fish_fallback_prompt
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if not set -q NVIM_LISTEN_ADDRESS # Neovim will swallow the 24bit sequences, rendering text white
|
|
||||||
and begin
|
|
||||||
set -q KONSOLE_PROFILE_NAME # KDE's konsole
|
|
||||||
or string match -q -- "*:*" $ITERM_SESSION_ID # Supporting versions of iTerm2 will include a colon here
|
|
||||||
or string match -q -- "st-*" $TERM # suckless' st
|
|
||||||
or test "$VTE_VERSION" -ge 3600 # Should be all gtk3-vte-based terms after version 3.6.0.0
|
|
||||||
or test "$COLORTERM" = truecolor -o "$COLORTERM" = 24bit # slang expects this
|
|
||||||
end
|
|
||||||
set -g fish_term24bit 1
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue