diff options
| author | Christian Cleberg <[email protected]> | 2026-02-08 11:52:31 -0600 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-02-08 11:52:31 -0600 |
| commit | af4b92b972bfcb8bd67d8132c953e6fbb1d02296 (patch) | |
| tree | 9df9f43a1003b8a67cf1d2c036af9cb7b41c9db4 /zsh | |
| parent | ab794ba43632d7e966999be63bfcc832614daf04 (diff) | |
| download | dotfiles-af4b92b972bfcb8bd67d8132c953e6fbb1d02296.tar.gz dotfiles-af4b92b972bfcb8bd67d8132c953e6fbb1d02296.tar.bz2 dotfiles-af4b92b972bfcb8bd67d8132c953e6fbb1d02296.zip | |
format ZSH and update Git
Diffstat (limited to 'zsh')
| -rw-r--r-- | zsh/.zshrc | 102 |
1 files changed, 66 insertions, 36 deletions
@@ -1,53 +1,83 @@ -echo 'export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH' >> ~/.zshrc - -# 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. +# ============================================================================== +# 1. PRE-INITIALIZATION (Instant Prompt) +# ============================================================================== 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 -export NVM_DIR="$HOME/.nvm" -[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm -[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion - +# ============================================================================== +# 2. ENVIRONMENT VARIABLES & PATH +# ============================================================================== +export PATH="/Users/cmc/.local/xonsh-env/xbin:$PATH" export GPG_TTY=$(tty) -alias l="ls -lha" -alias emacs="emacs -nw" +# NVM Configuration +export NVM_DIR="$HOME/.nvm" +[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" +[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" -# Lines configured by zsh-newuser-install +# History Settings HISTFILE=~/.histfile HISTSIZE=1000 SAVEHIST=1000 + +# ============================================================================== +# 3. COMPLETION & UI SETTINGS +# ============================================================================== bindkey -e -# End of lines configured by zsh-newuser-install -# The following lines were added by compinstall zstyle :compinstall filename '/Users/cmc/.zshrc' +autoload -Uz compinit && compinit -autoload -Uz compinit -compinit -# End of lines added by compinstall +# Load Theme source /opt/homebrew/share/powerlevel10k/powerlevel10k.zsh-theme - -# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh +# ============================================================================== +# 4. ALIASES +# ============================================================================== +alias l="ls -lha" +alias emacs="emacs -nw" +alias xclean="find . -name '.DS_Store' -type f -delete" + +# Git +alias g='git' +alias gs='git status' +alias ga='git add' +alias gaa='git add --all' +alias gc='git commit -v' +alias gcm='git commit -m' +alias gca='git commit --amend --no-edit' +alias gb='git branch' +alias gco='git checkout' +alias gcob='git checkout -b' +alias gma='git checkout main' + +# ============================================================================== +# 5. PLUGINS (Must be loaded after aliases for best results) +# ============================================================================== source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh -export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH -export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH -export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH -export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH -export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH -export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH -export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH -export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH -export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH -export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH -export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH -export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH -export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH -export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH -export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH -export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH -export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH + +# Syntax Highlighting MUST be the last thing sourced +source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh + +# ============================================================================== +# 6. SYNTAX HIGHLIGHTING CUSTOMIZATION +# ============================================================================== +# Must be defined AFTER the plugin is sourced +# Colors available: black, red, green, yellow, blue, magenta, cyan, white +# Styles: bold, underline + +# Highlight aliases in Cyan +ZSH_HIGHLIGHT_STYLES[alias]='fg=cyan,bold' + +# Highlight standard commands in Green +ZSH_HIGHLIGHT_STYLES[command]='fg=green' + +# Highlight built-ins (like cd, echo) in Magenta +ZSH_HIGHLIGHT_STYLES[builtin]='fg=magenta' + +# Highlight valid paths in White with an underline +ZSH_HIGHLIGHT_STYLES[path]='fg=white,underline' + +# Highlight errors (typos) in Red +ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=red,bold' |
