-
Notifications
You must be signed in to change notification settings - Fork 2
/
.zshrc
62 lines (54 loc) · 1.35 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
#
# Executes commands at the start of an interactive session.
#
path=(
/usr/local/opt/{coreutils,findutils}/libexec/gnubin
/usr/local/opt/curl/bin
/usr/local/opt/openssl/bin
/usr/local/opt/python/libexec/bin
/usr/local/bin
/usr/local/sbin
$HOME/.local/bin
$path
)
function activate_cloud() {
source ~/Work/.venvs/.venv/sgolovat-openrc.sh
source ~/Work/.venvs/.venv/bin/activate
}
# Functions
# Rolling slash
function rolling_slash() {
n=0
str='/-\|'
while true; do
n=$(( (n + 1) % 4))
printf '%s\b' "${str:$n:1}"
sleep 1
done
}
function add_upgrade_reviewers () {
if [ -z "$1" ]; then
sha=$(git rev-parse HEAD)
else
sha="$1"
fi
ssh -p 29418 [email protected] gerrit \
set-reviewers -a [email protected] \
-a [email protected] \
-a [email protected] ${sha}
}
# Generate Random password
function generate_pass() {
cat /dev/urandom | tr -d -c 'a-zA-Z0-9~!@#$%^&*()-_+={}[]|\:' | fold -w 16 | head -1
}
# Source Prezto.
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
fi
source ~/.aliases
export GOPATH=$HOME/.go
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
source ~/.venvs/.venv/bin/activate