-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
52 lines (44 loc) · 1000 Bytes
/
.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
ZSH_THEME="avit"
plugins=(git z)
export LS_COLORS="di=34:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=47;34:ow=1;34"
export DISPLAY=`grep -oP "(?<=nameserver ).+" /etc/resolv.conf`:0.0
export EDITOR="code --wait"
export PATH="$HOME/.local/bin:$PATH"
export PATH="/usr/local/go/bin:$PATH"
# https://github.com/Microsoft/WSL/issues/1838
# unsetopt BG_NICE
alias dc=docker-compose
alias g=git
alias pwsh=pwsh.exe
alias npmr="npm run"
alias npmc="npx npm-check"
alias npmcup="npx npm-check -u"
alias ys=yarn start
alias tf=terraform
alias tfp="terraform plan"
alias tfa="terraform apply"
alias p=pnpm
alias y=yarn
function gen-secret() {
# Length with default
length=${1:-32}
openssl rand -base64 $length
}
function run() {
number=$1
shift
for n in $(seq $number); do
$@
done
}
function run-break() {
number=$1
shift
for n in $(seq $number); do
echo "Run $n"
$@
if [ $? -eq 1 ]; then
break
fi
done
}