-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
115 lines (83 loc) · 2.53 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
DISABLE_MAGIC_FUNCTIONS="true"
export PATH=$HOME/bin:/usr/local/bin:$PATH
export PATH="/usr/local/sbin:$PATH"
# Path to your oh-my-zsh installation.
export ZSH="/Users/az/.oh-my-zsh"
export LC_CTYPE=C
export LANG=C
# fix for vim: https://stackoverflow.com/a/56743150/8080186
export LC_ALL=en_US.UTF-8
ZSH_THEME="agnoster"
# Uncomment the following line to display red dots whilst waiting for completion.
COMPLETION_WAITING_DOTS="true"
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# see 'man strftime' for details.
HIST_STAMPS="yyyy-mm-dd"
# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
plugins=(
brew
colored-man-pages
git
npm
osx
)
source $ZSH/oh-my-zsh.sh
# User configuration
# Repo: https://github.com/rupa/z
. ~/.z.sh
fpath=(/usr/local/share/zsh-completions $fpath)
source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
export LANG=en_US.UTF-8
# Compilation flags
export ARCHFLAGS="-arch x86_64"
# ssh
export SSH_KEY_PATH="~/.ssh/rsa_id"
alias vrc="vi ~/.vimrc"
alias zrc="vi ~/.zshrc"
alias szrc="source ~/.zshrc"
alias ohmyzsh="vi ~/.oh-my-zsh"
alias cx="code ."
alias cc="cd ~/GitHub"
# Shorthands
alias c="clear"
alias cls="c && ls"
alias l="ls -A"
alias la="ls -lA"
alias ll="ls -l"
alias lst="tree"
# Delete branch locally
alias gbd="git branch -d" # localBranchName
alias gbD="git branch -D" # same, but forced... or something
# Initial git push
alias gpp="git push --set-upstream origin" # master
# Delete branch remotely
alias gbdr="git push origin --delete" # remoteBranchName
# Sass
alias sassw="sass --watch sass/style.sass:style.css"
alias sasswc="sassw --style compressed"
# Python
alias pip="pip3"
alias pyms="python3 -m http.server --bind localhost"
# Jekyll
alias jekyllsw="bundle exec jekyll serve --watch"
# Gatekeeper disable
# Usage: disablegatekeeper /path/
alias disablegatekeeper="sudo xattr -rd com.apple.quarantine "
# Show random emojis in place of username@devicename
prompt_context() {
prompt_segment black default "⚡️"
}
# Show only current directory in agnoster theme
prompt_dir() { prompt_segment blue black '%c' }
# Enter key fix
stty sane
# Reminders
echo "Hi Ajit, try: cc, cx"
# source /usr/local/opt/nvm/nvm.sh
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
#[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion" # This loads nvm bash_completion