@@ -45,8 +45,12 @@ if type brew &>/dev/null; then
4545 FPATH=/usr/local/share/zsh/site-functions:$FPATH
4646fi
4747
48- autoload -U compinit
49- compinit -i
48+ autoload -Uz compinit
49+ if [ $( date +' %j' ) != $( /usr/bin/stat -f ' %Sm' -t ' %j' ${ZDOTDIR:- $HOME } /.zcompdump) ]; then
50+ compinit
51+ else
52+ compinit -C
53+ fi
5054
5155unsetopt menu_complete
5256unsetopt flowcontrol
@@ -180,8 +184,6 @@ alias -g ...='../..'
180184alias -g ....=' ../../..'
181185alias -g .....=' ../../../..'
182186
183- # fzz and ag
184- alias fazz=' fzz ag -i {{}}'
185187# fzz and find
186188alias fizz=' fzz find . -iname "*{{}}*"'
187189
@@ -191,35 +193,13 @@ alias n='vim +Notes' # Opens Vim and calls `:Notes`
191193# Go
192194alias got=' go test ./...'
193195
194- alias scr=' vim ~/tmp/scratch.md'
195-
196196alias k=' kubectl'
197197
198198alias -g withcolors=" | sed '/PASS/s//$( printf " \033[32mPASS\033[0m" ) /' | sed '/FAIL/s//$( printf " \033[31mFAIL\033[0m" ) /'"
199199
200200# #########
201201# FUNCTIONS
202202# #########
203- #
204- startpostgres () {
205- local pidfile=" /usr/local/var/postgres/postmaster.pid"
206- if [ -s $pidfile ] && kill -0 $( cat $pidfile | head -n 1) > /dev/null 2>&1 ; then
207- echo " Already running"
208- else
209- pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
210- fi
211- }
212-
213- stoppostgres () {
214- pg_ctl -D /usr/local/var/postgres stop
215- }
216-
217- # Taken from here: http://timbabwe.com/2012/05/iterm_tab_and_window_titles_with_zsh
218- # precmd () {
219- # tab_label=${PWD/${HOME}/\~} # use 'relative' path
220- # echo -ne "\e]2;${tab_label}\a" # set window title to full string
221- # echo -ne "\e]1;${tab_label: -24}\a" # set tab title to rightmost 24 characters
222- # }
223203
224204mkdircd () {
225205 mkdir -p $1 && cd $1
@@ -256,20 +236,6 @@ s3() {
256236 echo http://${route} | pbcopy
257237}
258238
259- vimfzz () {
260- exec vim $( fzz ag {{}} ${1} | awk -F" :" ' {print $1}' | uniq)
261- }
262-
263- cdfzz () {
264- local file=$( fzz find . -iname " *{{}}*" | head -n 1)
265- local filedir=$( dirname ${file} )
266- cd ${filedir}
267- }
268-
269- f () {
270- find . -iname " *${1} *"
271- }
272-
273239# ########
274240# PROMPT
275241# ########
0 commit comments