-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
146 lines (120 loc) · 3.34 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# PATHS
export ZSH="$HOME/.oh-my-zsh"
export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$HOME/bin:$HOME/.config/composer/vendor/bin:$PATH"
export PATH=$PATH:/usr/local/go/bin:/usr/local/go/bin/bin
export PATH=$PATH:/usr/local/julia/bin
# source "$HOME/.cargo/env"
# OH-MY-ZSH PLUGINS
plugins=(
git
yarn
zsh-autosuggestions
zsh-wakatime
colorize
zsh-syntax-highlighting
)
source $ZSH/oh-my-zsh.sh
# ALIASES
source $HOME/dotfiles-pv/folders
source $HOME/dotfiles-pv/ssh
# DOCKER
alias dps="docker ps"
alias dup="docker-compose up -d"
alias ddown="docker-compose down"
# SYSTEM UTILS
alias vim="nvim"
alias v='nvim'
alias c="code ."
alias vf='cd ~/.config/nvim && v'
alias bkp='cd && chmod +x .bkp-dot.sh && ./.bkp-dot.sh'
alias cl='xclip -sel clip'
alias ip="ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'"
alias fix='dotp && chmod +x fix.sh && ./fix.sh && cd'
alias sv='dotp && chmod +x sv.sh && ./sv.sh'
alias port='lsof -i'
alias not='echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_user_watches
echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_queued_events
echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_user_instances
'
alias ls='eza --icons'
alias cat='bat --style=auto'
alias so='source ~/.zshrc'
alias wip='git add . && git commit -m "wip"'
alias gcl='git add . && git commit -m "chore: linters"'
alias par='php artisan'
alias pas='php artisan serve'
alias nrd='npm run dev'
alias cf='composer fix'
alias ct='composer test'
alias cs='composer sniff'
alias zon='find . -name "*:Zone.Identifier" -type f -delete'
alias sail='bash vendor/bin/sail'
# changing php version
alias phpc='sudo update-alternatives --config php'
# neovim alternatives
alias avim="NVIM_APPNAME=astronvim nvim"
# PERSONAL FUNCTIONS
# rebase commits
function rbs () {
git rebase -i HEAD~$1
}
# push actual branch
function push () {
git push origin $(git branch --show-current)
}
# pull actual branch
function pull () {
git pull origin $(git branch --show-current)
}
# updating branch
function fet () {
git fetch -u -p
}
# deleting all branchs with prefixes feat/ and fix/
function cb () {
if read -q "choice?Tem certeza que deseja deletar todas branchs com prefixo feat/ e fix/ ? (N/y): "; then
echo
git branch | grep -e "feat/" -e "fix/" | xargs git branch -D
else
echo
echo "Cancelando.."
fi
}
# TMUX
alias t="tmux"
alias tls="tmux ls"
# tmux attach
function ta {
tmux a -t "$1"
}
# tmux new session
function tn {
tmux new -s "$1"
}
# docker bash
dex() {
docker exec -it "$1" /bin/bash
}
# docker sh
dex2() {
docker exec -it "$1" /bin/sh
}
# docker get ip
dip(){
docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "$1"
}
# initialise completions with ZSH's compinit
autoload -Uz compinit && compinit
# NVM
[ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
source $HOME/dotfiles-pv/gcp
# eval "$(op completion zsh)"; compdef _op op
source $HOME/.agent-bridge.sh
eval "$(starship init zsh)"
eval $(thefuck --alias fuck)
ev
clear
export PATH="/home/rmancan/.config/herd-lite/bin:$PATH"
export PHP_INI_SCAN_DIR="/home/rmancan/.config/herd-lite/bin:$PHP_INI_SCAN_DIR"