-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
142 lines (125 loc) · 5.41 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
#/$$$$$$$ /$$
#| $$__ $$ |__/
#| $$ \ $$ /$$$$$$ /$$$$$$$ /$$ /$$$$$$$
#| $$$$$$$ |____ $$ /$$_____/| $$ /$$_____/
#| $$__ $$ /$$$$$$$| $$$$$$ | $$| $$
#| $$ \ $$ /$$__ $$ \____ $$| $$| $$
#| $$$$$$$/| $$$$$$$ /$$$$$$$/| $$| $$$$$$$
#|_______/ \_______/|_______/ |__/ \_______/
# Enable colors and change prompt:
autoload -U colors && colors
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
# History in cache directory:
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.cache/zsh/history
# Basic auto/tab complete:
autoload -U compinit
zstyle ':completion:*' menu select
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
zmodload zsh/complist
compinit
_comp_options+=(globdots) # Include hidden files.
# History
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
#/$$$$$$$ /$$ /$$
#| $$__ $$| $$ |__/
#| $$ \ $$| $$ /$$ /$$ /$$$$$$ /$$ /$$$$$$$ /$$$$$$$
#| $$$$$$$/| $$| $$ | $$ /$$__ $$| $$| $$__ $$ /$$_____/
#| $$____/ | $$| $$ | $$| $$ \ $$| $$| $$ \ $$| $$$$$$
#| $$ | $$| $$ | $$| $$ | $$| $$| $$ | $$ \____ $$
#| $$ | $$| $$$$$$/| $$$$$$$| $$| $$ | $$ /$$$$$$$/
#|__/ |__/ \______/ \____ $$|__/|__/ |__/|_______/
#/$$ \ $$
#| $$$$$$/
#\______/
plugins=(
git
osx
rake
ruby
rbenv
dotenv
bundler
wakatime
history-substring-search
)
#/$$$$$$$$ /$$$ /$$ /$$ /$$
#| $$_____/ /$$ $$ | $$ | $$|__/
#| $$ /$$ /$$ /$$$$$$$ /$$$$$$$ /$$$$$$$ | $$$ | $$ | $$ /$$ /$$$$$$/$$$$
#| $$$$$| $$ | $$| $$__ $$ /$$_____/ /$$_____/ /$$ $$/$$ | $$ / $$/| $$| $$_ $$_ $$
#| $$__/| $$ | $$| $$ \ $$| $$ | $$$$$$ | $$ $$_/ \ $$ $$/ | $$| $$ \ $$ \ $$
#| $$ | $$ | $$| $$ | $$| $$ \____ $$ | $$\ $$ \ $$$/ | $$| $$ | $$ | $$
#| $$ | $$$$$$/| $$ | $$| $$$$$$$ /$$$$$$$//$$ | $$$$/$$ \ $/ | $$| $$ | $$ | $$
#|__/ \______/ |__/ |__/ \_______/|_______/|__/ \____/\_/ \_/ |__/|__/ |__/ |__/
# create virtual env
function penv() {
if [ $# -eq 0 ]
then
virtualenv env
source env/bin/activate
else
deactivate
fi
}
# git add, commit, push function
function gacp() {
git add .
git commit -a -m "$1"
git push
}
function gcp() {
git status
read -p ‘add: ' filestoadd
git add $filestoadd
read -p ‘commit message: ' msg
git commit -m “msg” --no-verify
git push origin $(git branch | sed -n -e 's/^\* \(.*\)/\1/p')
}
#/$$$$$$ /$$ /$$ /$$$ /$$$$$$$ /$$ /$$
#/$$__ $$| $$|__/ /$$ $$ | $$__ $$ | $$ | $$
#| $$ \ $$| $$ /$$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$$ | $$$ | $$ \ $$ /$$$$$$ /$$$$$$ | $$$$$$$ /$$$$$$$
#| $$$$$$$$| $$| $$ |____ $$ /$$_____/ /$$__ $$ /$$_____/ /$$ $$/$$ | $$$$$$$/|____ $$|_ $$_/ | $$__ $$ /$$_____/
#| $$__ $$| $$| $$ /$$$$$$$| $$$$$$ | $$$$$$$$| $$$$$$ | $$ $$_/ | $$____/ /$$$$$$$ | $$ | $$ \ $$| $$$$$$
#| $$ | $$| $$| $$ /$$__ $$ \____ $$| $$_____/ \____ $$ | $$\ $$ | $$ /$$__ $$ | $$ /$$| $$ | $$ \____ $$
#| $$ | $$| $$| $$| $$$$$$$ /$$$$$$$/| $$$$$$$ /$$$$$$$/ | $$$$/$$ | $$ | $$$$$$$ | $$$$/| $$ | $$ /$$$$$$$/
#|__/ |__/|__/|__/ \_______/|_______/ \_______/|_______/ \____/\_/ |__/ \_______/ \___/ |__/ |__/|_______/
# Aliases
alias g='git'
alias c='clear'
alias h='history'
alias l='lynx'
alias python=python3
alias ga='git add'
alias gs='git status'
alias gaa='git add .'
alias gpo='git push -u origin'
alias gc='git commit -m'
alias r='source ~/.zshrc'
alias gca='git commit -am'
alias goo='lynx google.com'
alias ddg='lynx duckduckgo.com'
alias go="/usr/local/go/bin/go"
# Paths
#export GOBIN="/Users/vaanshlakhwara/go/bin"
#export PATH="$PATH:$(yarn global bin)"
#export PATH=${PATH}:/usr/local/mysql/bin/
#export PATH=$HOME/bin:/usr/local/bin:$PATH
#export ZSH="/Users/vaanshlakhwara/.oh-my-zsh"
#export PATH=/usr/local/lib/node_modules/npm:$PATH
#export PATH=$$PATH:/usr/local/share/dotnet/
#export PATH="/Users/vaanshlakhwara/opt/anaconda3/bin:$PATH"
#export PATH="/usr/bin:/bin:/usr/sbin:/sbin"
#export PATH="/usr/local/bin:/usr/local/sbin:$PATH"
#export PATH=$PATH:/usr/local/go/bin
export PATH="$PATH:$(yarn global bin)"
export PATH=${PATH}:/usr/local/mysql/bin/
export PATH=$HOME/bin:/usr/local/bin:$PATH
export ZSH="/Users/vaanshlakhwara/.oh-my-zsh"
export PATH=/usr/local/lib/node_modules/npm:$PATH
export PATH="/Users/vaanshlakhwara/opt/anaconda3/bin:$PATH"
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
source /usr/local/share/zsh-history-substring-search/zsh-history-substring-search.zsh
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib=$HOME/perl5)"