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

Thorsten Glaser 1366451 at bugs.launchpad.net
Mon Sep 8 08:28:38 UTC 2014


Jason Spiro dixit:

>If the user runs

>"mksh -?"

This expands to a file in the current directory that begins with - and
has another byte after it.

>"mksh /?"

This expands to a single-byte file (or directory) under /

>"mksh -v"

This is already used by POSIX, see “man mksh”, under the “set” builtin.

>"mksh -h",

Same here.

>"mksh -V"
>"mksh -H"

These are in POSIX namespace, so we cannot really give them out.

>"mksh /h"

This tells mksh to run the script called “h” in the root directory.

>or if the user enters the single word "help" at a shell prompt

“help” is aliased to “man” in most beginner-friendly GNU/Linux
distributions, in /etc/profile usually.

>-- then perhaps mksh could echo:

No, it will not.

>mksh R50b+cvs

There is no such thing anyway… mksh just knows about
its $KSH_VERSION, and releases are a convenience (and
a point of testing).

>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

Ugh. No!


And I say that any Android user absolutely needing to know
the shell version is able to run the “set” command.

bye,
//mirabilos
-- 
„Cool, /usr/share/doc/mksh/examples/uhr.gz ist ja ein Grund,
mksh auf jedem System zu installieren.“
	-- XTaran auf der OpenRheinRuhr, ganz begeistert
(EN: “[…]uhr.gz is a reason to install mksh on every system.”)

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