mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 21:03:12 +00:00
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:
parent
72e9d41dcc
commit
39905d4135
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue