Package: mksh
Version: 54-2
Severity: wishlist
Tags: upstream

Dear Maintainer,

thank you for your work on mksh.

As for my reading of
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/alias.html,
the behaviour of alias in mksh is not compliant when passed a
not-existent alias.

With bash 4.4-1 (as comparison):

$ alias somecmd
STDOUT: (nil)
STDERR: -bash: alias: somecmd: not found
RETCOD: 1

With mksh 54-2:

$ alias somecmd
STDOUT: somecmd alias not found
STDERR: (nil)
RETCOD: 0

The Open Group Specifications says:

* STDOUT

| The format for displaying aliases (when no operands or only name
| operands are specified) shall be:
|
| "%s=%s\n", name, value

As the alias was undefined, I think the bash behaviour (no STDOUT) is
correct.

* STDERR

| The standard error shall be used only for diagnostic messages.

Again, the bash behaviour seems more reasonable to me.

* EXIT STATUS

| The following exit values shall be returned:
|
| 0  Successful completion.
| >0 One of the name operands specified did not have an alias
| definition, or an error occurred.

If I'm understanding it correctly, returning 0 in this context is a
violation of this specification.


Thank you,
Gian Piero.


-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.8.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages mksh depends on:
ii  libc6  2.24-5

Versions of packages mksh recommends:
ii  ed  1.10-2.1

mksh suggests no packages.

-- no debconf information

Reply via email to