Sujet : Re: Always use "--" (Was: Long filenames in DOS/Windows and Unix/Linux)
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.unix.programmerDate : 04. Sep 2024, 22:35:07
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vbajqa$3a4$1@dont-email.me>
References : 1 2 3 4 5 6
User-Agent : Pan/0.160 (Toresk; )
On Wed, 4 Sep 2024 13:17:48 -0000 (UTC), Lew Pitcher wrote:
The "--" option is just that, an option coded into the argument parser
of the program being invoked. Many programs /do not/ recognize "--" as
an "end of flags" argument, so the effectiveness of "--" is unreliable.
All the good ones do. This is why getopt(3) with POSIXLY_CORRECT stops
looking for options as soon as a nonoption argument is encountered.
Remember also that arguments need not necessarily be file names, so
prefixing them all with “./” willy-nilly may not produce the right result
anyway.