aboutsummaryrefslogtreecommitdiffstats
path: root/.zshrc
diff options
context:
space:
mode:
authorkatherine <shmibs@shmibbles.me>2017-04-08 18:33:52 -0700
committerkatherine <shmibs@shmibbles.me>2017-04-08 18:33:52 -0700
commit0b931aa6f85f114576af03d90d6e628fca665697 (patch)
treebd8dda941e2727d93ccf10fa218cf28a13d9684c /.zshrc
parentbfb8dafca0887235828abf1998091aa8b8f50f09 (diff)
downloaddotfiles-0b931aa6f85f114576af03d90d6e628fca665697.tar.gz
linting
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc35
1 files changed, 17 insertions, 18 deletions
diff --git a/.zshrc b/.zshrc
index 2a0964c..848413f 100644
--- a/.zshrc
+++ b/.zshrc
@@ -140,28 +140,28 @@ bindkey '^N' down-history
alias :q='exit'
-if [[ "$(whence vim)" != "" ]] then
+if [[ ! -z $(whence vim) ]] then
export EDITOR='vim'
alias svim='sudo -E vim'
alias svimdiff='sudo -E vim -d'
fi
-if [[ "$(whence nvim)" != "" ]] then
+if [[ ! -z $(whence nvim) ]] then
alias svim='sudo -E nvim'
alias svimdiff='sudo -E nvim -d'
alias vim='nvim'
export EDITOR='nvim'
fi
-[[ "$(whence sdcv)" != "" ]] && alias def='sdcv'
-[[ "$(whence mpv)" != "" ]] && alias dvd='mpv --deinterlace=yes dvd://'
-[[ "$(whence herbstclient)" != "" ]] && alias hc='herbstclient'
-[[ "$(whence aiksaurus)" != "" ]] && alias thesaurus='aiksaurus'
-[[ "$(whence ag)" != "" ]] && alias ag='ag --color-match "1;34"'
-[[ "$(whence latex)" != "" ]] && alias latex='latex -output-format=pdf'
-[[ "$(whence startx)" != "" ]] && alias sx='startx'
+[[ ! -z $(whence sdcv) ]] && alias def='sdcv'
+[[ ! -z $(whence mpv) ]] && alias dvd='mpv --deinterlace=yes dvd://'
+[[ ! -z $(whence herbstclient) ]] && alias hc='herbstclient'
+[[ ! -z $(whence aiksaurus) ]] && alias thesaurus='aiksaurus'
+[[ ! -z $(whence ag) ]] && alias ag='ag --color-match "1;34"'
+[[ ! -z $(whence latex) ]] && alias latex='latex -output-format=pdf'
+[[ ! -z $(whence startx) ]] && alias sx='startx'
-if [[ "$(whence udevil)" != "" ]] then
+if [[ ! -z $(whence udevil) ]] then
alias vmount='udevil mount'
alias vumount='udevil umount'
fi
@@ -169,14 +169,13 @@ fi
################## FUNCTIONS ##################
# ignore non-tracked files
-if [[ "$(whence git)" != "" ]] then
+if [[ ! -z $(whence git) ]] then
git() {
- if [[ $# -gt 0 ]] && [[ "$1" == "status" ]]; then
- shift
- $(whence -p git) status -uno "$@"
- else
- $(whence -p git) "$@"
- fi
+ case $1 in
+ status) shift; $(whence -p git) status -uno "$@" ;;
+ pull) shift; $(whence -p git) pull --recurse-submodules "$@" ;;
+ *) $(whence -p git) "$@" ;;
+ esac
}
fi
@@ -193,5 +192,5 @@ case $(uname) in
fi
;;
*)
- echo -e '[-- OS UNRECOGNISED --]'
+ echo -e '[-- OS UNRECOGNISED (T_T) --]'
esac