Skip to content

Instantly share code, notes, and snippets.

@ashleysommer
Created January 2, 2024 23:43
Show Gist options
  • Save ashleysommer/3bc1171df57710be0cd29605336e0e70 to your computer and use it in GitHub Desktop.
Save ashleysommer/3bc1171df57710be0cd29605336e0e70 to your computer and use it in GitHub Desktop.
~/.zshrc
# Do this first, to keep zprofile->zshrc ordering correct
if [ -z "$SYSTEM_ZPROFILED_LOADED" ]; then
if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.zsh; do
if [ -r $i ]; then
. $i
fi
done
unset i
fi
unset SYSTEM_ZPROFILED_LOADED
fi
# Set up the prompt
#Don't load this prompt if starship is loaded below
#autoload -Uz promptinit
#promptinit
#prompt bart
setopt histignorealldups sharehistory
# Use emacs keybindings even if our EDITOR is set to vi
bindkey -e
# Keep 4000 lines of history within the shell and save it to ~/.zsh_history:
HISTSIZE=4000
SAVEHIST=4000
HISTFILE=~/.zsh_history
export ZSH_TMUX_FIXTERM=false
#export ZSH_TMUX_TERM=tmux-256color
export OMZSH="$HOME/.oh-my-zsh"
export PATH="$HOME/.local/bin:$PATH"
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
plugins=(git git-extras bower debian docker node npm pip python sudo systemd tmux)
# if running in wezterm, turn off omzsh auto-title
if [[ -n "$WEZTERM_PANE" || -n "$WEZTERM_UNIX_SOCKET" ]]; then
DISABLE_AUTO_TITLE=true
INSIDE_EMACS=true
else
DISABLE_AUTO_TITLE=
INSIDE_EMACS=
fi
. $OMZSH/oh-my-zsh.sh
unset DISABLE_AUTO_TITLE
unset INSIDE_EMACS
. $HOME/.cargo/env
# Use modern completion system
autoload -Uz compinit
compinit
zstyle ':completion:*' auto-description 'specify: %d'
zstyle ':completion:*' completer _expand _complete _correct _approximate
zstyle ':completion:*' format 'Completing %d'
zstyle ':completion:*' group-name ''
zstyle ':completion:*' menu select=2
eval "$(dircolors -b)"
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*'
zstyle ':completion:*' menu select=long
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
zstyle ':completion:*' use-compctl false
zstyle ':completion:*' verbose true
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
export MICRO_TRUECOLOR=1
export DOTNET_CLI_TELEMETRY_OPTOUT=1
alias nano="/usr/bin/micro"
eval "$(starship init zsh)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment