Skip to content

Instantly share code, notes, and snippets.

@billbonney
Last active September 10, 2025 20:16
Show Gist options
  • Select an option

  • Save billbonney/b028444606e0521d23135a0916efb547 to your computer and use it in GitHub Desktop.

Select an option

Save billbonney/b028444606e0521d23135a0916efb547 to your computer and use it in GitHub Desktop.
Simple Simon .zshrc (The one that does it all with very little!)
#
# Simple Simon .zshrc
#
# Author: Bill Bonney
#
# This simple enough in that it adds all that is needed, without external dependencies
# - Command Completion
# - Reverse/Forware searching using up/down arrows
# - VCS supports (git focus) - shows branch name and status.
#
export ZDOTDIR="${XDG_CONFIG_HOME}/zsh"
export HISTFILE="${ZDOTDIR}/.zsh_history" # History filepath
export HISTSIZE=10000 # Maximum events for internal history
export SAVEHIST=10000 # Maximum events in history file
setopt SHARE_HISTORY # Share history instantly between all sessions
setopt INC_APPEND_HISTORY # Write commands to the history file immediately as they are entered
setopt HIST_IGNORE_ALL_DUPS
if [[ -f "$ZDOTDIR/.bash_aliases" ]]; then
source $ZDOTDIR/.bash_aliases
fi
autoload -U compinit; compinit
#_comp_options+=(globots) # With hidden files
zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path "$XDG_CACHE_HOME/.zcompcache"
zstyle ':completion:*' menu select
autoload -U up-line-or-beginning-search
autoload -U down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
bindkey "$terminfo[kcuu1]" up-line-or-beginning-search # Up
bindkey "$terminfo[kcud1]" down-line-or-beginning-search # Down
bindkey '^[[Z' reverse-menu-complete # Enables 'back tab' for completion
# Git & Prompt Configuration
autoload -Uz vcs_info
setopt PROMPT_SUBST
zstyle ':vcs_info:*' disable bzr cdv darcs mtn svk tla # disable unused vcs
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:*' get-revision true
zstyle ':vcs_info:*' check-for-changes true
zstyle ':vcs_info:*' stagedstr '%F{green}+%f'
zstyle ':vcs_info:*' unstagedstr '%F{yellow}!%f'
zstyle ':vcs_info:*' actionformats " - [%b%c%u|%F{cyan}%a%f]"
zstyle ':vcs_info:svn:*' branchformat '%b|%F{cyan}%r%f'
zstyle ':vcs_info:git*+set-message:*' hooks git-status
zstyle ':vcs_info:git:*' formats ' %F{cyan}%b%f %c%u%m'
precmd() {
print -Pn "\e]0;%~\a";
vcs_info
}
# Initalize Color
#source ${ZDOTFILES}/colors.zsh
source ${ZDOTDIR}/gruvbox_256palette.sh
NL=$'\n'
PROMPT='${NL}%n@%m: %F{green}%~%f%F{blue}${NL}${vcs_info_msg_0_}%f${NL}$ '
# Host Name Announcer
echo
print -P "%F{yellow}"
echo "$(figlet ${HOST%.local})"
print -P "%F{cyan}$HOSTTYPE%f %F{green}$(uname -m)%f"
echo
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init - zsh)"
eval "$(pyenv virtualenv-init -)"
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment