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

Re: equivalent of "if (( $+commands[FOO] ))" for functions?



[...]
> 	if (( $+commands[FOO] ))
> 	then
>
> 	# take actions
>
> 	fi
>
> but what I am wondering is: is there a way to have this same sort of
> check, except that it also includes zsh functions/aliases?

$+functions[foo], $+aliases[FOO]...

See "man zshmodules | less -p PARAMETER" for details.

Gruß Frank



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