Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(dirhistory): fix ALT+Up/Down key bindings for Terminal.app
- Loading branch information
Showing
1 changed file
with
32 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7f49494
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit seems to break up/down command history in Terminal.app on macOS. The default used to be that up/down traversed command history. Seemingly this change causes up/down to traverse directory history instead which is very crazy making when your muscle memory relied on it traversing history for decades.
7f49494
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this make Option+Up go to parent directory and Option+Down go to first child directory?
7f49494
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't seem to. I tried the CTRL-V trick to capture the escaped output for both UP and Option+UP and they are the same in Terminal.app - at least for me.
7f49494
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've set it back to what it was, so it at least doesn't break anything, but it looks like you'll have to add new keyboard sequences in your Terminal.app profile to send the
\e\e[A
and\e\e[B
sequences on Option+Up/Down.7f49494
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried adding entries for this, but they don't seem to generate the expected result. I still just get regular up/down without option. Maybe this is a bug in Terminal?
7f49494
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies, that has to be
\e\e[A
and\e\e[B
for Option-Up and Option-Down. I've edited the previous post.7f49494
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I'm missing something - It seems like the escape when creating entries in the preferences for terminal is \033 (achieved by pressing ESC)
So I have entries for \033\033[A and \033\033[B assigned to option+up and option+down respectively, but this still isn't generating the desired difference