Bug#496739: rename: man page should include "--" option

Dominic Hargreaves dom at earth.li
Sun Apr 28 22:14:05 UTC 2013


Control: tags -1 +wontfix

On Tue, Aug 26, 2008 at 09:41:11PM -0700, Wade Richards wrote:

> The man page for rename includes a synposis of :
>     rename [ -v ] [ -n ] [ -f ] perlexpr [ files ]
> The correct synopsis should be:
>     rename [ -v ] [ -n ] [ -f ] perlexpr [--] [ files ]
> 
> If the files you are renaming start with a "-", then you need to use the
> "--" switch before your filename, so that Getopt::Long can know to
> ignore them.  The man page for rename does not mention this.  Users
> who want to use rename on files that start with a "-" may be misled into
> thinking it is impossible by the confusing error messages.

While this is correct in one sense, to be consistent there are probably
several thousand other manpages which would need the same change applied.
Needing to protect option parsing code from such filenames is a
near-universal issue on unix systems, so I don't think here is the right
place to be documenting that sort of issue.

-- 
Dominic Hargreaves | http://www.larted.org.uk/~dom/
PGP key 5178E2A5 from the.earth.li (keyserver,web,email)




More information about the Perl-maintainers mailing list