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

Re: line noise of the day



On 14 September 2011 17:56, Mikael Magnusson <mikachu@xxxxxxxxx> 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



Messages sorted by: Reverse Date, Date, Thread, Author