-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
96 lines (92 loc) · 3.14 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
source ~/powerlevel10k/powerlevel10k.zsh-theme
source ~/zsh-autosuggestions/zsh-autosuggestions.zsh
source ~/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source ~/web-search/web_search.plugin.zsh
export PATH="/usr/local/opt/openjdk/bin:$PATH"
export PATH="/usr/local/opt/elasticsearch@6/bin:$PATH"
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"
export PATH="/usr/local/opt/[email protected]/bin:$PATH"
export PATH="$HOME/Qt5.5.0/5.5/clang_64/bin:$PATH"
export PATH="$HOME/development/flutter/bin:$PATH"
export warnflags=-Wno-error=implicit-function-declaration
export GOPATH="$HOME/go"
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
export GOOSE_DRIVER=postgres
export GOOSE_DBSTRING="user=postgres dbname=postgres sslmode=disable"
export ADMIN_TOOL_DEV="true"
# Aliases
alias projects="cd ~/projects"
alias brewi="arch -x86_64 brew install"
alias open_="micro ~/.zshrc"
alias fave="cd ~/projects/kfit-app"
alias arshion="cd ~/projects/arshion"
alias fr="flutter run --no-sound-null-safety"
alias fs="foreman start"
alias rs="rails s"
alias rc="rails c"
alias rcs="rc --sandbox"
alias bi="bundle i"
alias bec="bundle exec guard"
alias gi="gem i"
alias dbm="rake db:migrate RAILS_ENV=development"
alias dbs="rake db:migrate:status"
alias dbr="rake db:rollback"
alias s1="STEP=1"
alias c="clear"
alias rm="rm -rf"
alias rel!="source ~/.zshrc"
alias g="git"
alias gcl="git clone"
alias gst="git status"
alias gpf="git push -f origin"
alias gres="git reset --hard"
alias gf="git fetch"
alias gpl="git pull"
alias gc="git checkout"
alias gcm="gsm"
alias gr="git rebase"
alias grc="git rebase --continue"
alias gra="git rebase --abort"
alias gcp="git cherry-pick"
alias gcpc="git cherry-pick --continue"
alias gcpa="git cherry-pick --abort"
alias gpub="git push -u origin"
alias gb="git branch"
alias gs="git stash"
alias gsp"git stash push -m"
alias gsl="git stash list"
alias gsa="git stash apply"
alias gsd="git stash drop"
alias gbr="git branch -D"
alias gbro="git push -d origin"
alias gref="git reflog"
alias ga="git add"
alias gsearch="git branch --all | grep "
alias dc="docker-compose"
alias dcu="docker-compose up -d"
alias dcl="docker-compose logs -f"
alias mc="mailcatcher"
alias up="git pull && bundle check || bi && dbm"
alias gb="go build"
alias gr="go run"
alias nv= "nvim"
ulimit -n 20000
ulimit -u 1000
function gsm () { # Switch to main or master branch
git branch --list | grep ' master$'
if [[ $? -eq 0 ]]; then git checkout master
elif [[ $? -ne 0 ]]; then git branch --list | grep ' main$'
if [[ $? -eq 0 ]]; then git checkout main; fi
else # neither exists
git switch -c main
fi
}