-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOCS/man: replace legacy option syntax usage #14099
Conversation
Why? How |
The "Legacy option syntax" section (here) only talks about |
f8a5b8a
to
7613cd2
Compare
Flag options are normal options which take values in essence: they're equivalent to Since they are no different from options which take values, this description in the documentation also takes effect on flag options, which says such usage should be avoided:
|
Single letter flags (like I strongly disagree on making |
Single letter flags are pretty standard across any program. If you find the wording of the legacy option section in the documentation too ambiguous, I would suggest rewording that instead. |
MPlayer uses single dash for all options, while mpv prefers double dash. Treating single letter flags differently has no ground in MPlayer/mpv convention and history. Besides, these options already accept double dashes, so restricting it in the code creates backwards incompatibility. Also what about non flag single-letter options like
I can make an explicit exception for that and document it. Is this good enough for you? |
We are not in the void. Single letter flags are common like @Dudemanguy said.
Of course, we cannot introduce breaking change like that. But we should not recommend that either imho. I would go even further and add depreciation warning about inconsistent use of
No need for explicit exception. I think we should make it clear that all single-letter flags should be prefixed with single-dash Either way, I don't mind as long as |
They are replaced by --option=value.
7613cd2
to
79558f7
Compare
Reverted the
I don't think such preference is necessary.
This has been already used in the documentation, dating back to 2014: Line 1649 in 4fe6793
Line 7291 in 4fe6793
Line 1444 in 4fe6793
|
It's not a preference. It's the de facto standard. |
Doesn't matter. FFmpeg and gcc for example use single dash for long options, which doesn't conform to the "standard". There is no obligation for mpv to use single dash for single-letter options either. In all situations mentioned, the history and convention of individual programs take preference over everything else. See b85983a for example: this commit from 2014 explicitly changes the |
I wasn't talking about long options, which don't have any standard (neither POSIX nor de facto). Some programs use double dash some use single. But short options are very widely supported and expected with a single dash. So far I haven't seen any actual reason to document a syntax that's both unconventional and worse to type.
Arbitrary choices made in the past without any actual reasoning behind it isn't really a convincing argument. There's a 1k line document in this repo documenting all the interface changes each release. If "it was done this way before" was a valid argument by itself then you wouldn't be able to change anything at all aside from fixing bugs. |
The GNU
The reality says otherwise. Lots of GNU coreutils don't implement
So are arbitrary standards. If we strictly follow the POSIX standard and convention, we can't have long options at all.
I wanted to make |
They are replaced by
--option=value
.