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 14353
- From: Nikolai Weibull <now@xxxxxxxx>
- To: Atom Smasher <atom@xxxxxxxxxxx>
- Subject: Re: Simplest way to choose one of several commands
- Date: Tue, 8 Sep 2009 14:10:07 +0200
- Cc: Zsh Users <zsh-users@xxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=TnrLF66Jk2NurYFvtGoK6NW+KlII/N6v4U5v8emm5mY=; b=Gk22abQcELIL4ue0+dfTrZmMISwJexc0RLosMP9syHhcFjbL3SzXchldey4qW8bgCD RHgBDMZy9gyAx+SIwAJY+Wh4VN3jvevJ+4faAz2kxbMga7V6LQr/5FBoeYu2bJ+JBt3G CemVsLvAc97eVDY8DsQ1dlLC0la7YwZf5vMxs=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=HR9kWmGgquhGc43NJ7zoQqrZHuulHZzMxlsyMhryD8Fuo5EhJL9zuWijBfQembVXoz cn6n1m58k67RtLzHMTa5h+uumaGwLVlqGVgWySWVMweXsCK8cz4saF73DggrV0ElMuI2 LzU9b/W6Yus/21qIPT2pXxk9g6uGt6kymQHKo=
- In-reply-to: <20090908095108.4156.qmail@xxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <dbfc82860909070922u19535071v17842f1f10ffed4@xxxxxxxxxxxxxx> <20090908095108.4156.qmail@xxxxxxxxxxx>
- Sender: nikolai.weibull@xxxxxxxxx
On Tue, Sep 8, 2009 at 11:51, Atom Smasher<atom@xxxxxxxxxxx> wrote:
> 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.)
(You seem to have an encoding problem.)
> whence gls && alias ls="gls --color"
Thatâs definitely not what I need.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author