From 1570088c67b60712cacef96f4aeb487a40e403c9 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Mon, 2 May 2016 15:10:32 +0800 Subject: _zsh/40-functions.zsh: add "exists()" --- _zsh/40-functions.zsh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/_zsh/40-functions.zsh b/_zsh/40-functions.zsh index 46da01c..cd9ebc9 100644 --- a/_zsh/40-functions.zsh +++ b/_zsh/40-functions.zsh @@ -4,6 +4,11 @@ # execute 'functions ' to show function details. # +function exists() { + which $1 &> /dev/null +} + + function zsh_recompile() { autoload -U zrecompile rm -f ~/.zsh/*.zwc -- cgit v1.2.2