Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [[ -x =command ]]
- X-seq: zsh-users 12020
- From: Atom Smasher <atom@xxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: [[ -x =command ]]
- Date: Wed, 17 Oct 2007 10:40:59 +1300 (NZDT)
- In-reply-to: <20071016211319.GA2910@xxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Openpgp: id=0xB88D52E4D9F57808; algo=1 (RSA); size=4096; url=http://atom.smasher.org/pgp.txt
- References: <20071016210548.26560.qmail@xxxxxxxxxxx> <20071016211319.GA2910@xxxxxxxxxxxxxxx>
On Tue, 16 Oct 2007, Frank Terbeck wrote:
b) if not, what's the correct way to test if a command exists in the
PATH?
[[ -x $(which most) ]] && echo yay || echo nay
=============
cool, thanks...
[[ -x $(whence -p most) ]] && export PAGER=$(whence -p most)
--
...atom
________________________
http://atom.smasher.org/
762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
-------------------------------------------------
"War will cease when men refuse to fight."
-- F. Hansen
Messages sorted by:
Reverse Date,
Date,
Thread,
Author