zsh-users
 help / color / mirror / code / Atom feed
From: Kurtis Rader <krader@skepticism.us>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: "ls" output like find ... -print0 anyhow ???
Date: Sun, 26 Jan 2014 20:27:15 -0800	[thread overview]
Message-ID: <CABx2=D_zC3F0p5Gx3aKkVBzq0KRK1HbC2q6V+2bQPu28Bq4geA@mail.gmail.com> (raw)
In-Reply-To: <140126202020.ZM19008@torch.brasslantern.com>

[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]

I recognize that your example is artificial but it does not support
arbitrary "ls" options. It seems to me that ~meino is asking the wrong
question.


On Sun, Jan 26, 2014 at 8:20 PM, Bart Schaefer <schaefer@brasslantern.com>wrote:

> On Jan 26,  8:59pm, Phil Pennock wrote:
> }
> } I'd use the print builtin of zsh, so that there are no argv length
> } limitations, combined with zsh's very powerful glob operators.
>
> Meino mentioned in private email that he has particular reasons for
> using "ls" instead of "find".  If the options of "ls" are important
> (rather than just the file names) and you don't need to worry too
> much about CPU consumption:
>
>   print -N -- **/*(.e:'reply=("$(ls -l "$REPLY")")':) | xargs -0 ...
>
> That's going to run "ls -l" once for each plain file (.) below the
> current directory, so it's a lot more process-intensive than a single
> "ls -lR", and it may not sort in the order you expect, but it will
> give you "ls" output with $'\0'-terminated lines.
>



-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

  reply	other threads:[~2014-01-27  4:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-25  5:54 meino.cramer
2014-01-25 11:07 ` Han Pingtian
2014-01-25 11:51   ` Moritz Bunkus
2014-01-25 12:11 ` nyuszika7h
2014-01-25 12:13 ` Atom Smasher
2014-01-25 18:26 ` Bart Schaefer
2014-01-27  1:59 ` Phil Pennock
2014-01-27  3:49   ` Mikael Magnusson
2014-01-27  4:20   ` Bart Schaefer
2014-01-27  4:27     ` Kurtis Rader [this message]
2014-01-27 10:10     ` Atom Smasher

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='CABx2=D_zC3F0p5Gx3aKkVBzq0KRK1HbC2q6V+2bQPu28Bq4geA@mail.gmail.com' \
    --to=krader@skepticism.us \
    --cc=schaefer@brasslantern.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).