Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Simplest way to choose one of several commands
- X-seq: zsh-users 14344
- From: Nikolai Weibull <now@xxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxxxxx>
- Subject: Simplest way to choose one of several commands
- Date: Mon, 7 Sep 2009 18:22:12 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=zd5+d86hjb4wqhYI2/PVTvhIsgWRcFqwKciwAUtp+mY=; b=URwQMQf779aKZcaYamn6SsLAUA0bQX7aHEIB7uwAxEE689lewhn5792I3RQLHSaxBp qD/V7SQrCdCfeyBd2wNtNGjvxjUn5n6GKJqFiNZQ19AExiKuQLN94WuNLbnC0zP4C+eQ wV0CA3q+d/ROlW/UoysCdIIZ1pQwHESMRLbMc=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; b=OrxG1LxGTxvRPMKTT11Y2qdWPta4HoiRxJx3eqeGss/wieP/LKI/t3wb2oOUrlN5cK vYLwL7O8+0yk6/cosN609txESB6iCtMgJt2LeN+iqZ9m9FdMsCnw+OBNyQIvTRrdEFBQ Pd1PDUR0LbJg+YFvX5izhY4R7u9P8sIHLaSwI=
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Sender: nikolai.weibull@xxxxxxxxx
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.)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author