knoebber / zshrc / 442babf

~/.zshrc Commits Diff Raw
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
  source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi

source /opt/homebrew/opt/powerlevel10k/powerlevel10k.zsh-theme

# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh

# Set vi keybindings
bindkey -v

# History
export HISTFILE=~/.zsh_history
export HISTFILESIZE=100000
export HISTSIZE=100000

# https://zsh.sourceforge.io/Doc/Release/Options.html#index-history_002c-ignoring-duplicates
setopt extended_history
setopt hist_find_no_dups
setopt hist_ignore_all_dups
setopt hist_ignore_dups
setopt share_history
setopt autopushd
setopt pushdignoredups


# Enable C-R searching (make sure this appears after bindkey -v)
bindkey '^R' history-incremental-search-backward

# Aliases
alias ls='exa'
alias hist='history 1' # Show all history
alias d='dirs -v' # Show directory history (relies on autopushd, use pushd +<number> to restore)

export EDITOR='vim'
export ERL_AFLAGS="-kernel shell_history enabled" # Save history in iex
export PATH="$PATH:/Users/nicolasknoebber/go/bin"
export PATH="$PATH:/Users/nicolasknoebber/bin"

04/20/2022 4:00AM

save iex history