-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc
81 lines (63 loc) · 1.61 KB
/
zshrc
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
export ZSH="$HOME/.oh-my-zsh"
export VISUAL=nvim
export EDITOR="$VISUAL"
export PAGE=""
ZSH_THEME="garman"
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
COMPLETION_WAITING_DOTS="true"
# This makes repository status check for large repositories much, much faster.
DISABLE_UNTRACKED_FILES_DIRTY="true"
HIST_STAMPS="yyyy-mm-dd"
plugins=(git)
if [[ -z "$CODESPACES" ]]
then
export PATH="$HOMEBREW_PREFIX/opt/libpq/bin:$PATH"
else
export N_PREFIX="$HOME/n"; [[ :$PATH: == *":$N_PREFIX/bin:"* ]] || PATH+=":$N_PREFIX/bin"
fi
source $ZSH/oh-my-zsh.sh
# system
alias ls='ls -lG'
alias lsa='ls -lGa'
alias psgrep="ps aux | grep"
# git
alias g="git"
alias gsl="g status"
alias gs="g st"
alias gsr="g status -vv -s | cut -c4- | xargs rubocop"
alias ga="g add ."
alias gaa="g add --all"
alias lg="g lg"
alias gco="g co"
alias gb="g co -b"
alias gc="g c -v"
alias gcm="g co master"
alias gcma="g co main"
alias gpom="g pull origin master"
alias gpomain="g pull origin main"
alias gfo="g fetch origin"
alias gss="g stash save"
alias gsp="g stash pop"
alias gcsv="g commit -S -v"
alias gcsa="g commit -S --amend"
alias branch="g branch --sort=-committerdate"
# rails
alias rake="bin/rake"
alias br="bin/rails"
alias rc="br console"
alias rt="br test"
alias dbm="rake db:migrate db:test:prepare"
alias be="bundle exec"
alias bi="bundle install"
alias btc="bin/rails test_changes"
alias ss="script/server"
# Tmux
alias t="tmux"
alias tn="t new -t"
alias ta="t attach -t"
if which rbenv >/dev/null; then
eval "$(rbenv init - zsh)"
fi
if which nodenv >/dev/null; then
eval "$(nodenv init -)"
fi