diff options
author | Aaron LI <aaronly.me@gmail.com> | 2016-05-02 15:10:32 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@gmail.com> | 2016-05-02 15:10:32 +0800 |
commit | 1570088c67b60712cacef96f4aeb487a40e403c9 (patch) | |
tree | b857c44d7531323b4ffe6429cdc62bc3a4ec5f36 /_zsh | |
parent | 2c6e249a6bbd64a63b26ea1b7c2be1119037e5df (diff) | |
download | dotfiles-1570088c67b60712cacef96f4aeb487a40e403c9.tar.bz2 |
_zsh/40-functions.zsh: add "exists()"
Diffstat (limited to '_zsh')
-rw-r--r-- | _zsh/40-functions.zsh | 5 |
1 files changed, 5 insertions, 0 deletions
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 <func_name>' to show function details. # +function exists() { + which $1 &> /dev/null +} + + function zsh_recompile() { autoload -U zrecompile rm -f ~/.zsh/*.zwc |