aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2014-08-08 03:28:57 +0200
committerJohannes Löthberg <johannes@kyriasis.com>2014-08-08 03:28:57 +0200
commit78dabd1d649145549287a1d45b0462451a2e64b1 (patch)
tree884965e757afc3b05b6a02c3b69bb006bd4f4e9d
parentfeb3bae4b7e6994543812b8852c3fad681c500d3 (diff)
downloaddotfiles-78dabd1d649145549287a1d45b0462451a2e64b1.tar.xz
zshrc: Add have() function
Courtesy of grawity, <https://github.com/grawity/dotfiles.git> bashrc
-rw-r--r--zsh/.zshrc2
1 files changed, 2 insertions, 0 deletions
diff --git a/zsh/.zshrc b/zsh/.zshrc
index abac550..2f5c278 100644
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -80,6 +80,8 @@ alias mkdir='mkdir -vp'
alias acp='acp -g'
alias amv='amv -g'
+have() { command -v "$1" >&/dev/null; }
+
# Colored man
man() {
env LESS_TERMCAP_mb=$(printf "\e[1;31m") \