| @@ -1,53 +1,83 @@ |
| 1 | | echo 'export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH' >> ~/.zshrc |
| 2 | | |
| 3 | | # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. |
| 4 | | # Initialization code that may require console input (password prompts, [y/n] |
| 5 | | # confirmations, etc.) must go above this block; everything else may go below. |
| 1 | # ============================================================================== |
| 2 | # 1. PRE-INITIALIZATION (Instant Prompt) |
| 3 | # ============================================================================== |
| 6 | 4 | if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then |
| 7 | 5 | source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" |
| 8 | 6 | fi |
| 9 | 7 | |
| 10 | | export NVM_DIR="$HOME/.nvm" |
| 11 | | [ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm |
| 12 | | [ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion |
| 13 | | |
| 8 | # ============================================================================== |
| 9 | # 2. ENVIRONMENT VARIABLES & PATH |
| 10 | # ============================================================================== |
| 11 | export PATH="/Users/cmc/.local/xonsh-env/xbin:$PATH" |
| 14 | 12 | export GPG_TTY=$(tty) |
| 15 | 13 | |
| 16 | | alias l="ls -lha" |
| 17 | | alias emacs="emacs -nw" |
| 14 | # NVM Configuration |
| 15 | export NVM_DIR="$HOME/.nvm" |
| 16 | [ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" |
| 17 | [ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" |
| 18 | 18 | |
| 19 | | # Lines configured by zsh-newuser-install |
| 19 | # History Settings |
| 20 | 20 | HISTFILE=~/.histfile |
| 21 | 21 | HISTSIZE=1000 |
| 22 | 22 | SAVEHIST=1000 |
| 23 | |
| 24 | # ============================================================================== |
| 25 | # 3. COMPLETION & UI SETTINGS |
| 26 | # ============================================================================== |
| 23 | 27 | bindkey -e |
| 24 | | # End of lines configured by zsh-newuser-install |
| 25 | | # The following lines were added by compinstall |
| 26 | 28 | zstyle :compinstall filename '/Users/cmc/.zshrc' |
| 29 | autoload -Uz compinit && compinit |
| 27 | 30 | |
| 28 | | autoload -Uz compinit |
| 29 | | compinit |
| 30 | | # End of lines added by compinstall |
| 31 | # Load Theme |
| 31 | 32 | source /opt/homebrew/share/powerlevel10k/powerlevel10k.zsh-theme |
| 32 | | |
| 33 | | # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. |
| 34 | 33 | [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh |
| 35 | 34 | |
| 35 | # ============================================================================== |
| 36 | # 4. ALIASES |
| 37 | # ============================================================================== |
| 38 | alias l="ls -lha" |
| 39 | alias emacs="emacs -nw" |
| 40 | alias xclean="find . -name '.DS_Store' -type f -delete" |
| 41 | |
| 42 | # Git |
| 43 | alias g='git' |
| 44 | alias gs='git status' |
| 45 | alias ga='git add' |
| 46 | alias gaa='git add --all' |
| 47 | alias gc='git commit -v' |
| 48 | alias gcm='git commit -m' |
| 49 | alias gca='git commit --amend --no-edit' |
| 50 | alias gb='git branch' |
| 51 | alias gco='git checkout' |
| 52 | alias gcob='git checkout -b' |
| 53 | alias gma='git checkout main' |
| 54 | |
| 55 | # ============================================================================== |
| 56 | # 5. PLUGINS (Must be loaded after aliases for best results) |
| 57 | # ============================================================================== |
| 36 | 58 | source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh |
| 37 | | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
| 38 | | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
| 39 | | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
| 40 | | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
| 41 | | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
| 42 | | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
| 43 | | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
| 44 | | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
| 45 | | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
| 46 | | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
| 47 | | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
| 48 | | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
| 49 | | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
| 50 | | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
| 51 | | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
| 52 | | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
| 53 | | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
| 59 | |
| 60 | # Syntax Highlighting MUST be the last thing sourced |
| 61 | source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh |
| 62 | |
| 63 | # ============================================================================== |
| 64 | # 6. SYNTAX HIGHLIGHTING CUSTOMIZATION |
| 65 | # ============================================================================== |
| 66 | # Must be defined AFTER the plugin is sourced |
| 67 | # Colors available: black, red, green, yellow, blue, magenta, cyan, white |
| 68 | # Styles: bold, underline |
| 69 | |
| 70 | # Highlight aliases in Cyan |
| 71 | ZSH_HIGHLIGHT_STYLES[alias]='fg=cyan,bold' |
| 72 | |
| 73 | # Highlight standard commands in Green |
| 74 | ZSH_HIGHLIGHT_STYLES[command]='fg=green' |
| 75 | |
| 76 | # Highlight built-ins (like cd, echo) in Magenta |
| 77 | ZSH_HIGHLIGHT_STYLES[builtin]='fg=magenta' |
| 78 | |
| 79 | # Highlight valid paths in White with an underline |
| 80 | ZSH_HIGHLIGHT_STYLES[path]='fg=white,underline' |
| 81 | |
| 82 | # Highlight errors (typos) in Red |
| 83 | ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=red,bold' |