From: Frank Terbeck <ft@bewatermyfriend.org>
To: Zsh Users <zsh-users@zsh.org>
Subject: Re: equivalent of "if (( $+commands[FOO] ))" for functions?
Date: Tue, 07 Aug 2012 00:36:30 +0200 [thread overview]
Message-ID: <87hasfir69.fsf@ft.bewatermyfriend.org> (raw)
In-Reply-To: <CAPHo7Jcp4CoYOjACfOuKQ6dBuS8gCNGy-yCC9e6zCRseahhZug@mail.gmail.com> (TjL's message of "Mon, 6 Aug 2012 18:13:47 -0400")
[...]
> 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
next prev parent reply other threads:[~2012-08-06 22:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-06 22:13 TjL
2012-08-06 22:36 ` Frank Terbeck [this message]
2012-08-06 22:38 ` Benjamin R. Haskell
2012-08-06 23:12 ` TjL
2012-08-07 13:17 ` Benjamin R. Haskell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87hasfir69.fsf@ft.bewatermyfriend.org \
--to=ft@bewatermyfriend.org \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).