bugzilla-daemon at mindrot.org
2005-Jan-10 23:54 UTC
[Bug 970] document -- as option/non-option separator
http://bugzilla.mindrot.org/show_bug.cgi?id=970 Summary: document -- as option/non-option separator Product: Portable OpenSSH Version: -current Platform: All URL: http://bugs.debian.org/289401 OS/Version: Linux Status: NEW Severity: enhancement Priority: P2 Component: Documentation AssignedTo: openssh-bugs at mindrot.org ReportedBy: cjwatson at debian.org Estimated Hours: 0.00 The OpenSSH utilities use getopt(), which according to http://www.opengroup.org/onlinepubs/009695399/functions/getopt.html, manual pages on the BSD and Linux systems I checked, and openbsd-compat/getopt.c, stops scanning options when it encounters a "--". Greg Kochanski noted in a Debian bug report that it's useful for reliable scripting purposes to be able to rely on this feature, because it eliminates the possibility that a wildcard or a variable expansion might expand to a valid option. Since it seems generally useful and available, could this feature be documented? Thanks. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2005-Jan-11 02:24 UTC
[Bug 970] document -- as option/non-option separator
http://bugzilla.mindrot.org/show_bug.cgi?id=970 djm at mindrot.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WONTFIX ------- Additional Comments From djm at mindrot.org 2005-01-11 13:24 ------- That is a standard feature of getopt(3) and therefore I don't think it needs repeating in the documentation of every application that uses it. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2005-Jan-11 02:40 UTC
[Bug 970] document -- as option/non-option separator
http://bugzilla.mindrot.org/show_bug.cgi?id=970 ------- Additional Comments From cjwatson at debian.org 2005-01-11 13:40 ------- I view it as pretty similar to saying that options start with '-'; a small thing and absolutely standard, but it would be very confusing to leave it out. In any case, so many programs roll their own option parsing in one way or another that I don't think it's unreasonable that a user wouldn't be sure that ssh uses getopt without going and grovelling through the source. If you don't want to repeat it, perhaps at least refer to getopt(3) (though it's not wonderful user-level documentation) so that it's clear that ssh uses it? ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.