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

Re: Simplest way to choose one of several commands



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