Skip to content

Handle empty fish_key_bindings in fish 4.3 (fixes #624)#625

Open
sstieger wants to merge 1 commit intoIlanCosman:mainfrom
sstieger:fix/vi-mode-empty-fish-key-bindings
Open

Handle empty fish_key_bindings in fish 4.3 (fixes #624)#625
sstieger wants to merge 1 commit intoIlanCosman:mainfrom
sstieger:fix/vi-mode-empty-fish-key-bindings

Conversation

@sstieger
Copy link

@sstieger sstieger commented Jan 7, 2026

Fish 4.3 seems to leave $fish_key_bindings empty by default, causing a false positive in the vi_mode check.

Description

Updated _tide_item_vi_mode to explicitly check for non-empty $fish_key_bindings first.

Closes #624.

How Has This Been Tested

  • I have tested using Linux.
  • I have tested using MacOS.

Checklist

  • I am ready to update the wiki accordingly.
  • I have updated the tests accordingly.

Fish 4.3 seems to leave $fish_key_bindings empty by default, causing a
false positive in the vi_mode check.
@sstieger sstieger requested a review from IlanCosman as a code owner January 7, 2026 01:19
@@ -1,5 +1,5 @@
function _tide_item_vi_mode
test "$fish_key_bindings" != fish_default_key_bindings && switch $fish_bind_mode
test -n "$fish_key_bindings" && test "$fish_key_bindings" != fish_default_key_bindings && switch $fish_bind_mode

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fish 4.3 seems to leave $fish_key_bindings empty by default, causing a false positive in the vi_mode check.

yeah it's only set on the first fish_prompt or fish_read event now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Letter D appears in my prompt

3 participants