[Bug 1366451] Re: "mksh -v" should display mksh's version number, plus the attached chunk of text, onscreen

Jason Spiro jasonspiro4 at gmail.com
Mon Sep 8 02:48:25 UTC 2014


> 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.

I stand corrected.

> GNU --long-options have nothing to do
> with a Unix program.

Touché.

> The Android user would just type “set“, or “echo $KSH_VERSION”.

Not all Android users are so good with Unix that they know they should
do that.

> status: New → Opinion

Hmmm. How about this?

If the user runs "mksh -?", "mksh /?", "mksh -v", "mksh -V", "mksh -h",
"mksh -H", or "mksh /h" -- or if the user enters the single word "help"
at a shell prompt -- then perhaps mksh could echo:

--- cut here ---
mksh R50b+cvs
For help: <http://mirbsd.de/mksh>.

--- cut here ---

Then, if applicable, treat the "-v" or "-V" or "-h" or "-H" or "/h" as
POSIX/SUSv4 require.  So, don't terminate; instead, show the shell
prompt and proceed as if the user had entered a "set" command. Or, look
for an executable file in the root directory named "/h", try to launch
it, and if it wasn't found, inform the user.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to mksh in Ubuntu.
https://bugs.launchpad.net/bugs/1366451

Title:
  "mksh -v" should display mksh's version number, plus the attached
  chunk of text, onscreen

Status in The MirBSD Korn Shell:
  Opinion
Status in “mksh” package in Ubuntu:
  Opinion
Status in “mksh” package in Debian:
  Opinion

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://mirbsd.de/mksh>.

  Copyright (C) 2002-2014 Thorsten Glaser.
  This is open-source software; see <https://www.mirbsd.org/TaC-mksh.txt> for copying conditions.

  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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mksh/+bug/1366451/+subscriptions



More information about the foundations-bugs mailing list