| @@ -1,53 +1,83 @@ |
| 1 | echo 'export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH' >> ~/.zshrc |
1 | # ============================================================================== |
| 2 | |
2 | # 1. PRE-INITIALIZATION (Instant Prompt) |
| 3 | # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. |
3 | # ============================================================================== |
| 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. |
| |
| 6 | if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then |
4 | if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then |
| 7 | source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" |
5 | source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" |
| 8 | fi |
6 | fi |
| 9 | |
7 | |
| 10 | export NVM_DIR="$HOME/.nvm" |
8 | # ============================================================================== |
| 11 | [ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm |
9 | # 2. ENVIRONMENT VARIABLES & PATH |
| 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 |
10 | # ============================================================================== |
| 13 | |
11 | export PATH="/Users/cmc/.local/xonsh-env/xbin:$PATH" |
| 14 | export GPG_TTY=$(tty) |
12 | export GPG_TTY=$(tty) |
| 15 | |
13 | |
| 16 | alias l="ls -lha" |
14 | # NVM Configuration |
| 17 | alias emacs="emacs -nw" |
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 | HISTFILE=~/.histfile |
20 | HISTFILE=~/.histfile |
| 21 | HISTSIZE=1000 |
21 | HISTSIZE=1000 |
| 22 | SAVEHIST=1000 |
22 | SAVEHIST=1000 |
| |
23 | |
| |
24 | # ============================================================================== |
| |
25 | # 3. COMPLETION & UI SETTINGS |
| |
26 | # ============================================================================== |
| 23 | bindkey -e |
27 | bindkey -e |
| 24 | # End of lines configured by zsh-newuser-install |
| |
| 25 | # The following lines were added by compinstall |
| |
| 26 | zstyle :compinstall filename '/Users/cmc/.zshrc' |
28 | zstyle :compinstall filename '/Users/cmc/.zshrc' |
| |
29 | autoload -Uz compinit && compinit |
| 27 | |
30 | |
| 28 | autoload -Uz compinit |
31 | # Load Theme |
| 29 | compinit |
| |
| 30 | # End of lines added by compinstall |
| |
| 31 | source /opt/homebrew/share/powerlevel10k/powerlevel10k.zsh-theme |
32 | source /opt/homebrew/share/powerlevel10k/powerlevel10k.zsh-theme |
| 32 | |
| |
| 33 | # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. |
| |
| 34 | [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh |
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 | source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh |
58 | source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh |
| 37 | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
59 | |
| 38 | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
60 | # Syntax Highlighting MUST be the last thing sourced |
| 39 | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
61 | source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh |
| 40 | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
62 | |
| 41 | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
63 | # ============================================================================== |
| 42 | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
64 | # 6. SYNTAX HIGHLIGHTING CUSTOMIZATION |
| 43 | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
65 | # ============================================================================== |
| 44 | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
66 | # Must be defined AFTER the plugin is sourced |
| 45 | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
67 | # Colors available: black, red, green, yellow, blue, magenta, cyan, white |
| 46 | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
68 | # Styles: bold, underline |
| 47 | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
69 | |
| 48 | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
70 | # Highlight aliases in Cyan |
| 49 | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
71 | ZSH_HIGHLIGHT_STYLES[alias]='fg=cyan,bold' |
| 50 | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
72 | |
| 51 | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
73 | # Highlight standard commands in Green |
| 52 | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
74 | ZSH_HIGHLIGHT_STYLES[command]='fg=green' |
| 53 | export PATH=/Users/cmc/.local/xonsh-env/xbin:$PATH |
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' |