"mksh -v" should display mksh's version number, plus the attached chunk of text, onscreen
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mksh |
Opinion
|
Undecided
|
Unassigned | ||
mksh (Debian) |
Opinion
|
Undecided
|
Unassigned | ||
mksh (Ubuntu) |
Opinion
|
Undecided
|
Unassigned |
Bug Description
It's customary in the Unix world that "-v" or "--version" displays a program's version. If someone is logged into an Android device, you want to make it easy for them to find out which shell is installed. How can you do this? One way is to offer a "-v" option which will tell them the answer (and will also tell them mksh's version number).
May I suggest that, if the user runs "mksh -v", then mksh should echo the following to stdout, after which it should immediately exit.
--- cut here ---
mksh R50b+cvs
This is mksh, the MirBSD Korn Shell.
Homepage: <http://
Copyright (C) 2002-2014 Thorsten Glaser.
This is open-source software; see <https:/
This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to
the utmost extent permitted by applicable law, neither express nor
implied; without malicious intent or gross negligence.
summary: |
- mksh -v should display mksh's version number, plus the attached chunk of - text, onscreen + "mksh -v" should display mksh's version number, plus the attached chunk + of text, onscreen |
No.
• GNU --long-options have nothing to do with a Unix program.
• A flag to display the version is not historically customary in Unix programs.
The adoption of -V (not -v which is verbose) is recent and not normally used.
• “mksh -x” is the same as running “set -x” in the shell, which means that the
namespace for these options is defined by, mostly, POSIX/SUSv4, on which we
will not infringe for something like that.
The Android user would just type “set“, or “echo $KSH_VERSION”.
The Debian or *buntu user would just type “dpkg-query -W mksh” or (more common but cuts off version numbers) “dpkg -l mksh”.