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

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



I only recently learned about this method of taking some action only
if the command 'FOO' is found:

	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?

If yes, what's the syntax for that?

Otherwise I'll keep using 'which' and sending the output to /dev/null
but I figured it was worth asking.

Thanks!

TjL



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