From: Mikael Magnusson <mikachu@gmail.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Re: line noise of the day
Date: Wed, 14 Sep 2011 18:18:41 +0200 [thread overview]
Message-ID: <CAHYJk3QiNVN9CLQwbq8F8=aAWV5+TAPUdcytr1CFvSkqdwka_g@mail.gmail.com> (raw)
In-Reply-To: <CAHYJk3R70_-EF4DEF_K_SEMK8DaUGtgVN89KxB5exC5oYybuiw@mail.gmail.com>
On 14 September 2011 17:56, Mikael Magnusson <mikachu@gmail.com> wrote:
> <dmos> anyone know a script/oneliner to find all duplicate/shadowed
> commands on $PATH?
> <Mikachu> print -l $^commands(e,'() { (( $# > 1 )) && REPLY=$@ }
> $^path/$REPLY:t(N)',N)
I should have thought of this, but the above will only work in 4.3.13
and later. This should work with a few more versions (and any
linebreaks are added by gmail, join them with a space).
print -l $^commands(e,'a () { (( $# > 1 )) && REPLY=$@ }; a
$^path/$REPLY:t(N)',N)
--
Mikael Magnusson
prev parent reply other threads:[~2011-09-14 16:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-14 15:56 Mikael Magnusson
2011-09-14 16:18 ` Mikael Magnusson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAHYJk3QiNVN9CLQwbq8F8=aAWV5+TAPUdcytr1CFvSkqdwka_g@mail.gmail.com' \
--to=mikachu@gmail.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).