mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 01:04:10 +08: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
@ -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,
|
||||
# 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
|
||||
return
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user