Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/bin/sh



Module Name:    src
Committed By:   kre
Date:           Mon Oct 14 08:27:54 UTC 2024

Modified Files:
        src/bin/sh: option.list options.c sh.1

Log Message:
Add a -r (version) option to sh

This new -r (or +r) option is for command line use only.
When encountered, the shell simply prints its version info
(such as it has, which isn't much) and exits (immediately).

This allows "funny" uses like
        sh -version
the -v and -e options are standard, and processed as normal
(changing nothing, yet, except setting the option).  Then the
'r' option is seen, the version info is printed, and the shell
exits.  Any remaining "options" (there is no "-o n" option) are
ignored, as are any other args given to the shell.

The string printed (currently) is just "NetBSD shell:" followed
by the value of the NETBSD_SHELL variable (which has been established
already by the time options are processed).


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/bin/sh/option.list
cvs rdiff -u -r1.60 -r1.61 src/bin/sh/options.c
cvs rdiff -u -r1.266 -r1.267 src/bin/sh/sh.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index