Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Simplest way to choose one of several commands
- X-seq: zsh-users 14352
- From: Atom Smasher <atom@xxxxxxxxxxx>
- To: Nikolai Weibull <now@xxxxxxxx>
- Subject: Re: Simplest way to choose one of several commands
- Date: Tue, 8 Sep 2009 21:51:11 +1200 (NZST)
- Cc: Zsh Users <zsh-users@xxxxxxxxxx>
- In-reply-to: <dbfc82860909070922u19535071v17842f1f10ffed4@xxxxxxxxxxxxxx>
- 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: <dbfc82860909070922u19535071v17842f1f10ffed4@xxxxxxxxxxxxxx>
On Mon, 7 Sep 2009, Nikolai Weibull wrote:
Is there a simpler way of doing the following?
alias ls=${${(f)"$(whence -p {g,}ls)"}[1]}' --color'
I need to select gls, if thatÿÿs whatÿÿs installed, otherwise ls. (The
code above assumes that at least ls is installed, which isnÿÿt a
problem.)
===================
whence gls && alias ls="gls --color"
--
...atom
________________________
http://atom.smasher.org/
762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
-------------------------------------------------
"Religion is what keeps the poor from murdering the rich."
-- Napoleon Bonaparte
Messages sorted by:
Reverse Date,
Date,
Thread,
Author