Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(dotfiles): remove defunct bind feature detection for fish #2532

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kidonng
Copy link

@kidonng kidonng commented Jan 8, 2025

This was originally included in #265 to detect support for bind -M, but versions not supporting the feature were long archaic, and the detection practically becomes if true:

$ codespace:/> fish --version
fish, version 3.1.0
$ codespace:/> bind -M insert # By default there's no mode-specific bindings
$ codespace:/> if bind -M insert &> /dev/null; echo true; end
true

It also has a small cost for users with considerable mode-specific bindings, e.g. with fish_vi_key_bindings enabled:

$ time bind -M insert &> /dev/null

________________________________________________________
Executed in    1.34 millis    fish           external 
   usr time  541.00 micros  541.00 micros    0.00 micros 
   sys time  492.00 micros  492.00 micros    0.00 micros

(Note in this very case it's just ~1ms, but this check is prevalent and can add up. I'd like to address this in other programs too.)

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.

1 participant