fish_vi_cursor: skip if stdin is not a tty

Instead of skipping for non-interactive shells, skip when stdin is not a tty.
This allows the cursor to be set for scripts that use the `read` command.
This commit is contained in:
bitraid 2023-11-14 19:09:04 +02:00 committed by Johannes Altmanninger
parent 33a9659cd1
commit a5dfa84f73

View file

@ -1,6 +1,6 @@
function fish_vi_cursor -d 'Set cursor shape for different vi modes'
# If we're not interactive, there is effectively no bind mode.
if not status is-interactive
# if stdin is not a tty, there is effectively no bind mode.
if not test -t 0
return
end