Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: A conditional test to see whether a function is loaded?



On 6/9/07, William Scott <wgscott@xxxxxxxxxxxxxxxxxx> wrote:
Thanks!

Frank Terbeck wrote:

> zsh% [[ -n ${functions[promptinit]} ]] && echo yay || echo nay


I have a similar question.  Is there a shorter, more zsh-y way to do:
[[ -x `which aptitude` ]]

Obviously replace aptitude with any program.  I tried [[ -x =aptitude
]] but that gives error messages if it doesn't exist.

--
-fREW



Messages sorted by: Reverse Date, Date, Thread, Author