1

Setup: MacOs Mojave, iTerm, Fish shell 3.0.2, using fisher have theme bob-the-fish installed as well.

Would like to be able to use command line navigation keyboard shortcuts such as ctrl-A to get t the beginning of the line. But it is not happening.

Further complication ctrl-U works to delete the line that is before the cursor. but ctrl-A does not work.

I ran fish_key_reader based on an Internet post. And this is the outcome.

for ctrl-U

fish_key_reader                                 


hex:   15  char: \cU
bind \cU 'do something'

for ctrl-A

hex:    1  char: \cA
bind \cA 'do something'

Any clues as to how make this work?

Thank you!

  • I recommend you flag a moderator to move this Q to stackoverflow. There are more fish people there. – glenn jackman Apr 30 at 21:58
  • @glennjackman thanks for your observation! The answer from Zanchey worked. But will keep in mind for any future questions. – jim70 May 1 at 19:50
1

You have the fish vi key bindings enabled, but Ctrl-A is only defined in the fish emacs key bindings. Ctrl-U is defined for both styles.

To make Ctrl-A work, you can either switch back to the default emacs key bindings with fish_default_key_bindings, or you can add a bind invocation to your config.fish:

bind \ca beginning-of-line
| improve this answer | |
  • Thank you - this worked! Will read more about these bindings in general. And thank you for the links as well. – jim70 May 1 at 19:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.