fish_vi_cursor: Don't fail if --force-iterm is given in non-iterm

Otherwise this would have used it as the terminal.

Fixup!

[ci skip]
This commit is contained in:
Fabian Homborg 2019-05-05 13:04:50 +02:00
parent e952f60b02
commit 46b804cf19

View File

@ -44,12 +44,10 @@ function fish_vi_cursor -d 'Set cursor shape for different vi modes'
# HACK: Explicitly disable on ITERM because of #3696, which is weirdness with multi-line prompts. # 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. # 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. # It's recommended only if you don't use a multi-line prompt.
if set -q ITERM_PROFILE if contains -- $argv[1] --force-iterm
if contains -- $argv[1] --force-iterm set -e argv[1]
set -e argv[1] else if set -q ITERM_PROFILE
else return
return
end
end end
set -l terminal $argv[1] set -l terminal $argv[1]