Skip to content

Instantly share code, notes, and snippets.

@julian-west
Last active June 6, 2022 12:57
Show Gist options
  • Save julian-west/4c19cc06685df896aa72ed472e8f9046 to your computer and use it in GitHub Desktop.
Save julian-west/4c19cc06685df896aa72ed472e8f9046 to your computer and use it in GitHub Desktop.
Example .zshrc file with oh-my-zsh
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# need to disable in order for exa ls alias to work
DISABLE_LS_COLORS="true"
# FZF settings
export FZF_BASE="$HOME/.fzf"
export FZF_DEFAULT_COMMAND='rg --hidden --no-ignore --files -g "!.git/"'
export FZF_CTRL_T_COMMAND=$FZF_DEFAULT_COMMAND
export FZF_DEFAULT_OPTS='--height 40% --layout=reverse --border'
ZSH_THEME="robbyrussell"
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=244"
# plugins
plugins=(
git
zsh-syntax-highlighting
zsh-autosuggestions
fzf
zsh-z
)
# aliases
alias python=python3
alias gs="git status"
alias ls="exa --icons"
alias ll="exa -l -g --icons"
alias lt="exa --tree --icons -a -I '.git|__pycache__|.mypy_cache|.ipynb_checkpoints'"
alias fp="fzf --preview 'bat --style=numbers --color=always --line-range :500 {}'"
alias gt='starship toggle gcloud disabled'
source $ZSH/oh-my-zsh.sh
# pyenv stuff
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
# set starship as prompt
eval "$(starship init zsh)"
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment