From e952f60b02ef83cd1897c8051e27b2b8bf87f071 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Sun, 5 May 2019 13:01:02 +0200 Subject: [PATCH] functions/fish_vi_cursor: Disable on iTerm, allow override I still don't get #3696, so let's just offer an override for now. [ci skip] --- share/functions/fish_vi_cursor.fish | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/share/functions/fish_vi_cursor.fish b/share/functions/fish_vi_cursor.fish index a73a45ee3..4d2f6a1b1 100644 --- a/share/functions/fish_vi_cursor.fish +++ b/share/functions/fish_vi_cursor.fish @@ -41,6 +41,17 @@ function fish_vi_cursor -d 'Set cursor shape for different vi modes' return end + # HACK: Explicitly disable on ITERM because of #3696, which is weirdness with multi-line prompts. + # We allow an explicit "--force-iterm" as first argument to skip this. + # It's recommended only if you don't use a multi-line prompt. + if set -q ITERM_PROFILE + if contains -- $argv[1] --force-iterm + set -e argv[1] + else + return + end + end + set -l terminal $argv[1] set -q terminal[1] or set terminal auto