From 9f6ba5db7a4024a4fe35cf1bdb0a4c7966d163ea Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Mon, 5 Sep 2016 14:37:21 +0200 Subject: [PATCH] Disable fish_vi_cursor in unsupported TERMs --- share/functions/fish_vi_cursor.fish | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/share/functions/fish_vi_cursor.fish b/share/functions/fish_vi_cursor.fish index c94e7a973..2872644a0 100644 --- a/share/functions/fish_vi_cursor.fish +++ b/share/functions/fish_vi_cursor.fish @@ -1,4 +1,11 @@ function fish_vi_cursor -d 'Set cursor shape for different vi modes' + # Since we read exported variables (KONSOLE_PROFILE_NAME and ITERM_PROFILE) + # we need to check harder if we're actually in a supported terminal, + # because we might be in a term-in-a-term (emacs ansi-term). + if not contains -- $TERM xterm konsole xterm-256color konsole-256color + and not set -q TMUX + return + end set -l terminal $argv[1] set -q terminal[1] or set terminal auto