-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc.local
71 lines (60 loc) · 1.9 KB
/
.zshrc.local
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
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
FOLDERS_TO_REMOVE="/mnt/c/.*"
export PATH=$( echo ${PATH} | tr -s ":" "\n" | grep -vwE "(${FOLDERS_TO_REMOVE})" | tr -s "\n" ":" | sed "s/:$//" )
# tell zsh not to nice background processes to fix the permission problem untill its fixed correctly
unsetopt BG_NICE
# get the dark blue color problem
LS_COLORS="di=00;36" && export LS_COLORS
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="robbyrussell"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
plugins=(
docker
npm
tmux
)
# add fzf (for now the default way..later as a custom plugin
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
############### aliases ###############
# vim
alias vim='vim -o'
# git
alias g='git status'
alias gx='git checkout'
alias gf='git fetch'
alias gp='git pull'
alias gpr='git pull --rebase'
alias gP='git push'
alias gm='git merge'
alias gmm='git merge master'
alias ga='git add'
alias gaa='git add -A'
alias gcm='git commit'
alias gcma='git commit --amend'
alias gd='git diff --color'
alias gdc='git diff --color --cached'
alias gdw='git diff -w'
alias gb='git branch -vv'
alias gba='git branch -avv'
alias gl='git log --stat --color'
alias glp='git log -p --color'
alias glpw='git log -p -w --color'
alias gr='git rebase'
alias grc='git rebase --continue'
alias gra='git rebase --abort'
alias grs='git rebase --skip'
alias grom='git rebase origin/main'
alias gsu='git submodule update'
############## functions ##############
# git
function gri() {
if [[ -z "$1" ]]; then
git rebase -i
else
git rebase -i --autosquash HEAD~$1
fi
}
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm