Skip fish_vi_cursor when not interactive

This prints an escape sequence, so it can break scp or similar when
someone has an unqualified

    fish_vi_key_bindings

in config.fish and happens to run a terminal that can set the cursor.
This commit is contained in:
Fabian Homborg 2018-06-01 20:26:54 +02:00
parent 72e9d41dcc
commit 39905d4135

View file

@ -13,6 +13,11 @@ function fish_vi_cursor -d 'Set cursor shape for different vi modes'
# But since tmux in konsole seems rather common and that case so uncommon, # But since tmux in konsole seems rather common and that case so uncommon,
# we will just fail there (though it seems that tmux or st swallow it anyway). # we will just fail there (though it seems that tmux or st swallow it anyway).
# If we're not interactive, there is effectively no bind mode.
if not status is-interactive
return
end
if set -q INSIDE_EMACS if set -q INSIDE_EMACS
return return
end end