1. 8
    1. 2

      Also worth reading: bash(1).

    2. 1

      The most useful thing for me is making the up arrow only list completions starting with what I already typed. So if I type ls<Up> it will only list completion items starting with ls. I find it much more useful/accurate than <C-r> searching.

      In zshrc:

      autoload -Uz up-line-or-beginning-search down-line-or-beginning-search
      zle -N up-line-or-beginning-search
      zle -N down-line-or-beginning-search
      bindkey '^[[A'  up-line-or-beginning-search    # Arrow up
      bindkey '^[OA'  up-line-or-beginning-search
      bindkey '^[[B'  down-line-or-beginning-search  # Arrow down
      bindkey '^[OB'  down-line-or-beginning-search

      And inputrc:

      # Up/down arrows
      "\e[A": history-search-backward
      "\e[B": history-search-forward
      1. 1

        I’ve been using zsh-history-substring-search which returns items containing the string anywhere (like <C-r> search) on the <Up> key. I usually do want to match on some middle part of the command, even though I do sometimes run something that I don’t want because I do it too fast :D