OpenBSD CVS

CVS log for src/usr.bin/getopt/getopt.1


[BACK] Up to [local] / src / usr.bin / getopt

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.20 / (download) - annotate - [select for diffs], Tue May 4 21:03:31 2021 UTC (3 years ago) by naddy
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, HEAD
Changes since 1.19: +9 -2 lines
Diff to previous 1.19 (colored)

shell scripts should use getopts instead of getopt

Add a prominent deprecation notice to getopt.1.
Add examples of the getopts idiom to sh.1 and ksh.1.

Requested by and ok espie@, ok jmc@

Revision 1.19 / (download) - annotate - [select for diffs], Fri Mar 16 16:58:26 2018 UTC (6 years, 2 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.18: +5 -3 lines
Diff to previous 1.18 (colored)

improve markup quality in the cases found by the new "--" style message

Revision 1.18 / (download) - annotate - [select for diffs], Sun Jan 19 09:15:08 2014 UTC (10 years, 4 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.17: +16 -15 lines
Diff to previous 1.17 (colored)

A SYNOPSIS should not attempt to provide examples, so trim it;
a better example already exists in the EXAMPLES section.
The DESCRIPTION should not provide examples either,
in particular not bad ones, so move that to CAVEATS.
Also fix various markup.
OK jmc.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Nov 14 09:55:28 2012 UTC (11 years, 6 months ago) by sobrado
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (colored)

fix a bug, hidden by the break statement in the special option case,
in the example code.

millert@ suggested using -ne instead of -gt since $# can't be negative.

ok millert@

Revision 1.16 / (download) - annotate - [select for diffs], Thu Oct 28 18:33:28 2010 UTC (13 years, 6 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)

knock out some "-*- nroff -*-" lines;

Revision 1.15 / (download) - annotate - [select for diffs], Sun Apr 12 23:13:36 2009 UTC (15 years, 1 month ago) by okan
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.14: +5 -2 lines
Diff to previous 1.14 (colored)

document that no leading whitespace is permitted between the option and
argument if the argument is deemed to be optional ('::').

feedback and ok jmc@ and millert@

Revision 1.14 / (download) - annotate - [select for diffs], Thu May 31 19:20:10 2007 UTC (16 years, 11 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)

convert to new .Dd format;

Revision 1.13 / (download) - annotate - [select for diffs], Fri Jan 26 17:42:53 2007 UTC (17 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

after some discussion with otto, remove "errcode=$?;" from getopt's
synopsis: it is really not central to its usage;

ok otto millert

Revision 1.12 / (download) - annotate - [select for diffs], Wed Jan 24 19:11:14 2007 UTC (17 years, 3 months ago) by otto
Branch: MAIN
Changes since 1.11: +5 -5 lines
Diff to previous 1.11 (colored)

The example is not correct and uses non-idiomatic scripting. So fix it.
ok espie@

Revision 1.11 / (download) - annotate - [select for diffs], Sat Jan 14 09:37:24 2006 UTC (18 years, 4 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.10: +10 -1 lines
Diff to previous 1.10 (colored)

document why we avoid: set -- `getopt optstring $*`

Revision 1.10 / (download) - annotate - [select for diffs], Sat Jan 14 09:29:51 2006 UTC (18 years, 4 months ago) by jmc
Branch: MAIN
Changes since 1.9: +5 -4 lines
Diff to previous 1.9 (colored)

update the example and synopsis so that we are checking the
exit value of getopt itself, not `set';

example merged from current freebsd page;
problem reported by nordin; ok millert

Revision 1.9 / (download) - annotate - [select for diffs], Fri Jan 13 22:13:53 2006 UTC (18 years, 4 months ago) by jmc
Branch: MAIN
Changes since 1.8: +15 -16 lines
Diff to previous 1.8 (colored)

- kill some of the mad escaping;

Revision 1.8 / (download) - annotate - [select for diffs], Mon Feb 17 13:39:37 2003 UTC (21 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4, OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.7: +5 -1 lines
Diff to previous 1.7 (colored)

copyrights added;

des_crypt(3): Eric Young
aac(4): Michael Smith, BSDi, Niklas Hallqvist; ok niklas@
bktr(4): Amancio Hasty, Roger Hardiman
getopt(1): Henry Spencer (public domain)
pcnfds(8): Sun

Revision 1.7 / (download) - annotate - [select for diffs], Sat Apr 15 02:15:11 2000 UTC (24 years, 1 month ago) by aaron
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1, OPENBSD_3_0_BASE, OPENBSD_3_0, OPENBSD_2_9_BASE, OPENBSD_2_9, OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.6: +2 -3 lines
Diff to previous 1.6 (colored)

Mostly punctuation fixes.

Revision 1.6 / (download) - annotate - [select for diffs], Tue Mar 7 21:11:09 2000 UTC (24 years, 2 months ago) by aaron
Branch: MAIN
Changes since 1.5: +9 -9 lines
Diff to previous 1.5 (colored)

Various cleanup.

Revision 1.5 / (download) - annotate - [select for diffs], Sat Mar 4 22:19:23 2000 UTC (24 years, 2 months ago) by aaron
Branch: MAIN
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored)

In Unix land we prefer "whitespace" to "white space" or "white-space". At
least, this is the impression I get from looking at a lot of Perl docs.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Jul 4 11:53:54 1999 UTC (24 years, 10 months ago) by aaron
Branch: MAIN
CVS Tags: OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.3: +6 -6 lines
Diff to previous 1.3 (colored)

correct use of .Nm; some other formatting nits

Revision 1.3 / (download) - annotate - [select for diffs], Sat Sep 26 19:54:50 1998 UTC (25 years, 7 months ago) by aaron
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.2: +4 -4 lines
Diff to previous 1.2 (colored)

usr.bin/ man page fixes, f-m.

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jun 26 05:33:44 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2, OPENBSD_2_1_BASE, OPENBSD_2_1, OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored)

rcsid

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:45:19 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:45:19 1995 UTC (28 years, 7 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.