Skip to content

Instantly share code, notes, and snippets.

@zshanabek
Created February 14, 2026 08:18
Show Gist options
  • Select an option

  • Save zshanabek/6eff7a4b55a0d2ed34662c5b8ee30686 to your computer and use it in GitHub Desktop.

Select an option

Save zshanabek/6eff7a4b55a0d2ed34662c5b8ee30686 to your computer and use it in GitHub Desktop.
Minimal Zsh config: Autocomplete + Arrow-Up History Search (no Oh My Zsh)
# tab autocompletion
# “history search with ↑/↓” (matches what you already typed)
# --- completion ---
autoload -Uz compinit
compinit
# --- history ---
HISTFILE=~/.zsh_history
HISTSIZE=50000
SAVEHIST=50000
setopt HIST_IGNORE_ALL_DUPS HIST_REDUCE_BLANKS SHARE_HISTORY INC_APPEND_HISTORY
# --- ↑/↓ search history based on what you've typed ---
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 # Up arrow
bindkey '^[[B' down-line-or-beginning-search # Down arrow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment