diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2025-11-26 08:44:14 -0500 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2025-11-26 08:44:14 -0500 |
| commit | f8e1a6aef0dc0b2faa267f48696f40fd5404889c (patch) | |
| tree | 6c31b14a5e3565949ff5e2d10d732d9e4c3bdd8d /zsh/.zshrc | |
| parent | Update install scripts for macos and linux and use sh (diff) | |
| download | dotfiles-f8e1a6aef0dc0b2faa267f48696f40fd5404889c.zip | |
Consolidate zsh config down to 1 file
Diffstat (limited to 'zsh/.zshrc')
| -rwxr-xr-x | zsh/.zshrc | 104 |
1 files changed, 95 insertions, 9 deletions
@@ -1,11 +1,97 @@ #!/usr/bin/env zsh -source ~/.zsh/prompt.sh -source ~/.zsh/tmux.sh -source ~/.zsh/completion.sh -source ~/.zsh/history.sh - -source ~/.zsh/env.sh -source ~/.zsh/languages.sh -source ~/.zsh/path.sh -source ~/.zsh/aliases.sh +# +# Setup Shell Prompt +# +# This enables a simple prompt with git info +# and the current working directory. +# +autoload -Uz vcs_info +zstyle ":vcs_info:*" enable git +zstyle ':vcs_info:git:*' formats '%F{green}(%b)%f ' +precmd() { + vcs_info +} +setopt prompt_subst +NEWLINE=$'\n' +PROMPT=' %2~ ${vcs_info_msg_0_}%# ' + +# +# Setup the zsh shell completion system +# +# See `man zshcompsys`. +# +autoload -Uz compinit +compinit + +# +# Setup shell history +# +export HISTFILE=~/.zhistory +export HISTSIZE=100000 +export SAVEHIST=100000 + +# +# Setup default env variables +# +export EDITOR="nvim" +export BROWSER="firefox" +export GPG_TTY=$(tty) +export PAGER="less" +export MANPAGER="less" +export BAT_THEME="tokyonight_night" +export SRC_DIR="$HOME/src" +export BIN_DIR="$HOME/bin" + +export XDG_CONFIG_HOME="$HOME/.config" +export XDG_DATA_HOME="$HOME/.local/share" +export XDG_CACHE_HOME="$HOME/.cache" +export XDG_STATE_HOME="$HOME/.local/state" + +# +# Append additional directories onto PATH +# +PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:$HOME/bin:$HOME/.local/bin; +export PATH + +# +# Aliases +# +alias gs="git status" +alias gc="git commit" +alias ga="git add" +alias gd="git diff" +alias gds="git diff --staged" +alias gp="git push" +alias gpo="git push origin" +alias gpl="git pull" +alias gplrb="git pull --rebase" +alias gl="git log" +alias gv="git log --graph --decorate --oneline" +alias gch="git checkout" +alias gcb="git checkout -b" + +alias h="history 25" +alias j="jobs -l" +alias l="ls -alG" + +alias vi="nvim" +alias vim="nvim" + +# +# Language setup +# +export GOPATH="$SRC_DIR/go" +export GOBIN="$SRC_DIR/go/bin" +export PATH="$GOPATH/bin:$PATH" +export PATH="$GOROOT/bin:$PATH" +export PATH="$GOBIN:$PATH" +export GOPROXY="direct" + +export PYENV_ROOT="$HOME/.pyenv" +export PATH="$PYENV_ROOT/bin:$PATH" +command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" +eval "$(pyenv init -)" + +. "$HOME/.cargo/env" + |