On Fri, Aug 14, 2020 at 04:30:13AM +0100, ropers wrote:
> The find man page might benefit from adding a little bit more
> user-friendly hand-holding here:
> 
> Index: find.1
> ===================================================================
> RCS file: /cvs/src/usr.bin/find/find.1,v
> retrieving revision 1.98
> diff -u -r1.98 find.1
> --- find.1    2 Sep 2019 21:18:41 -0000       1.98
> +++ find.1    14 Aug 2020 02:59:48 -0000
> @@ -231,6 +231,10 @@
>  .Qq {}
>  appears anywhere in the utility name or the
>  arguments it is replaced by the pathname of the current file.
> +The semicolon will likely have to be escaped, depending on the shell.
> +See
> +.Sx CAVEATS
> +below.
>  .Pp
>  If terminated by a plus sign,
>  the pathnames for which the
> 
> 
> EXAMPLE:
> ========
> $ find ~ -iname ".*" -exec echo {} \;
> works, but
> $ find ~ -iname ".*" -exec echo {} ;
> does not.
> 
> (Yes, this is a contrived example.  I wouldn't want to make people
> copy things all over the place.)
> 

hi.

first off, i do sympathise ;) shell escaping always hurts my head too.

regarding your diff: i don;t think this is the way to go. really, we
would have to add such a text every time we encounter a character that
may need escaping. so the whole point of the text in CAVEATS in to avoid
such a large text addition, and just remind people to watch out
(caveat!) the text in CAVEATS pretty much makes your diff redundant.

the EXAMPLES section additionally shows escaping.

i think there's enough there for people.

havng said that:

- i had hoped we'd have a specific \; example. that format is so
  commonly seen that it might make sense. so i'd not be against either
  adding such an example (currently EXAMPLES is fairly small) or
  altering another.

- i cannot work out what is with the \! examples. i know we try to make
  entries work for both csh and sh style shells, but stuff like this
  works without escaping:

        $ find . ! -type f

jmc

Reply via email to