-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
124 lines (94 loc) · 2.91 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
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH
export PATH=$JAVA_HOME/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=$USER/.oh-my-zsh
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="bullet-in"
# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
HYPHEN_INSENSITIVE="true"
# Uncomment the following line to display red dots whilst waiting for completion.
COMPLETION_WAITING_DOTS="true"
# Which plugins would you like to load?
# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git)
source $ZSH/oh-my-zsh.sh
# User configuration
# use vim as the visual editor
export VISUAL=vim
export EDITOR="$VISUAL"
# zmv allows us to do some cool rename things
autoload -U zmv
# syntax highlighter
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
unsetopt correct_all
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# make enter send return and not ^M TODO - figure out where this comes from
stty sane;
stty icrnl;
# Preserve Insert Cursor shape in nvim using iterm
export NVIM_TUI_ENABLE_CURSOR_SHAPE=1
function cd {
builtin cd "$@";
ls -a;
}
function gplom {
BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [[ "$BRANCH" == "master" ]]; then
git pull origin master --rebase;
return
fi
GS_OUTPUT=$(git status --porcelain)
if [[ -n "$GS_OUTPUT" ]]; then
echo "stashing detected changes"
git stash;
fi
git checkout master;
git pull origin master --rebase --autostash;
git checkout -;
git rebase master;
if [[ -n "$GS_OUTPUT" ]]; then
git stash pop;
fi
}
function gc {
git commit $1 $2;
}
function gs {
git status;
}
function prof {
vim ~/.zshrc;
}
function reprof {
source ~/.zshrc;
}
BULLETTRAIN_PROMPT_ORDER=(
time
context
dir
git
)
alias awk1="awk '{print \$1}'"
alias awk2="awk '{print \$2}'"
alias awk3="awk '{print \$3}'"
alias awklast="rev | awk1 | rev"
alias ..="cd .." # if you’re not using “.” for sourcing bash
alias c=clear
function ppjson {
echo $@ | python -m json.tool;
}