From: Vorpal <zsh@vorpal.se>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [Bug] Errors in find completion
Date: Wed, 6 Apr 2022 23:39:31 +0200 [thread overview]
Message-ID: <0011e947-eea5-a639-a99d-6b8df76e4876@vorpal.se> (raw)
In-Reply-To: <CAH+w=7YLa5zzWbJonmwLwpPgofJWW5GMafJgywA3x=51t97gnw@mail.gmail.com>
On 2022-04-06 23:11, Bart Schaefer wrote:
> On Wed, Apr 6, 2022 at 8:55 AM Vorpal <zsh@vorpal.se> wrote:
>>
>> 1. Missing handling of -newerXY:
>
> Ubuntu 20.0x LTS has this option, as does MacOS does, at least as far
> back as Catalina. Neither one lists this variation in --help output.
> On MacOS, these can also be "inverted" as -Bnewer, -mnewer, etc.,
> whereas on Ubuntu only the historic -anewer and -cnewer are
> "invertible".
Not quite the same thing. -newerXY allows you to compare for example the
creation time to the access time (not sure *why* that would be useful,
but it is possible) or any other such permutation. the -Bnewer/-mnewer
etc doesn't seem to support such mixing.
As for versions, according to the man page of GNU find (4.9.0) on Arch
Linux, in the HISTORY section, -newerXY has been around since version
4.3.3, and "also occurs in BSD".
>> 2. Incorrect handling of -exec, -execdir, -ok etc:
>>
>> However it is not only ; that will terminate arguments to the program in
>> question. + also works.
>
> Yep.
3. Another issue: Missing completion
When reading the GNU find man page HISTORY section it seems that a new
flag was introduced in 4.9.0, which should probably be supported in the
completion:
-files0-from file
Read the starting points from file instead of getting them on the
command line. In contrast to the known limitations of passing starting
points via arguments on the command line, namely the limitation of the
amount of file names, and the inherent ambiguity of file names clashing
with option names, using this option allows to safely pass an
arbitrary number of starting points to find.
[... this section is quite long in the man page, I suggest looking at
for example https://man.archlinux.org/man/find.1 if you don't have it
locally and want to read the full thing ...]
Something like:
'-files0-from[search NUL separated paths from FILE]:file:_path'
should do the trick.
The feature before that and -newerXY (-D, added in 4.3.1) seems to be
supported by zsh completion. I haven't checked if all older features
are also supported.
next prev parent reply other threads:[~2022-04-06 21:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-06 15:54 Vorpal
2022-04-06 21:11 ` Bart Schaefer
2022-04-06 21:39 ` Vorpal [this message]
2022-04-06 22:07 ` Lawrence Velázquez
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=0011e947-eea5-a639-a99d-6b8df76e4876@vorpal.se \
--to=zsh@vorpal.se \
--cc=zsh-workers@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).