4

For the last few weeks I've been unable to use the up and down arrow keys to navigate my command history in zsh.

I'm using the following:

  • Intel MacBook Pro with macOS Big Sur 11.0.1 (20B29)
  • zsh 5.8 (x86_64-apple-darwin19.3.0)
  • iTerm 3.4.2
  • oh my zsh (latest master)

I tried a few solutions from existing answers but I couldn't find a way to make it work. Here is some output from commands related to the issue:

Read and pressing the up arrow key

$ read
^[[A

Bindkey

$ bindkey | grep up-line
"^[OA" up-line-or-beginning-search
"^[[5~" up-line-or-history
"^[[A" up-line-or-history

Related variables

$ echo $HISTFILE
/Users/mac/.zsh_history
$ echo $SAVEHIST
10000
$ ls -l $HISTFILE
-rw-------  1 mac  staff  74285 Dec  3 14:57 /Users/mac/.zsh_history

Changing the binding to up-line-or-search didn't seem to help.

Not exactly sure where else to look and where this problem might originate. Has anyone encountered this?

2 Answers 2

3

Try to change settings in iTerm -> settings -> terminal -> terminal emulation-> report terminal type -> to xterm.

iTerm Settings

1
  • Worked for me. Mine was previously set to "xterm256-color" which was working fine until a recent update (which is basically whenever you open iTerm). Colors still showing with "xterm". Thanks.
    – manafire
    Aug 4, 2021 at 12:28
-1

Bell Icon/ring means an error (History has been disabled on this host). You can type history to validate that you don't get any output.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .