-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc.symlink
63 lines (56 loc) · 1.74 KB
/
zshrc.symlink
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# export PATH=$HOME/broadway/bin:$PATH
export PATH=~/broadway/bin:$PATH
export PATH="/opt/homebrew/opt/ruby/bin:$PATH"
export PATH="/opt/homebrew/lib/ruby/gems/3.1.0/bin:$PATH"
# Load NVM
eval "$(/opt/homebrew/bin/brew shellenv)"
[ -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
# Customize the command prompt:
autoload -U colors && colors
PROMPT='[%F{208}ellm%f %F{039}%1~%f ]$ '
# History:
HISTSIZE=10000
SAVEHIST=10000
# Completetion:
autoload -Uz compinit
# auto-complete w/ keyboard
zstyle ':completion:*' menu select
# case-insensitive completion
zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}'
zmodload zsh/complist
compinit
# bind up/down arrow keys to traverse history autocomplete hinting
bindkey '\e[A' history-beginning-search-backward
bindkey '\e[B' history-beginning-search-forward
## Show git info:
autoload -Uz vcs_info
precmd_vcs_info() { vcs_info }
precmd_functions+=( precmd_vcs_info )
setopt prompt_subst
RPROMPT=\$vcs_info_msg_0_
zstyle ':vcs_info:git:*' formats '%F{240}(%b)%r%f'
zstyle ':vcs_info:*' enable git
# Alias:
alias gaa="git add -A"
alias gss="git status -s"
alias gco="git checkout"
alias gl="git log"
alias gc="git commit -m"
alias gcbail="git merge --abort"
alias gcp="git cherry-pick"
## NPM
alias nrb="npm run build"
alias nrd="npm run dev"
## Folder navigation
alias ..="cd .."
alias ...="cd ../.."
## File and directory viewing
alias ls="ls -lG"
## Text Editing
alias vi="vim"
alias vim="nvim"
# Include external configs:
[ -f "$HOME/.zshrclocal" ] && source "$HOME/.zshrclocal"