[vlc-devel] Explain how to open a file starting with '-' from the command line

Rémi Denis-Courmont rem at videolan.org
Sun Feb 22 18:22:12 CET 2009


Le dimanche 22 février 2009 18:35:08 Sveinung Kvilhaugsvik, vous avez écrit :
> I have created a patch to add information to an error message. I have
> not been able to build the latest version from git on my system. (It
> fails during bootstrap while in modules/packetizer/Makefile.am) I
> could get 0.9.4 to compile, so I backported my patch to it and tested
> that it worked there. I'm not very experienced using C. Could anyone
> test it against the latest version and/or review it for me to see if I
> have made any mistakes? The patch will be a follow up to this message.

From the POSIX Utility Syntax Guidelines (POSIX.2008 §12.2), and consistent 
with the IEEE 1003.1-2001 standard:

| Guideline 10:
| The argument -- should be accepted as a delimiter indicating the end of
| options. Any following arguments should be treated as operands, even if
| they begin with the '-' character. The -- argument should not be used as
| an option or as an operand.

As an example:

# vlc -v --aout alsa -- -filename-starting-with-a-dash

Best regards,

Rémi Denis-Courmont

More information about the vlc-devel mailing list