[Bug 282833] misc/mc mc syntax is inconsistent between shell

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 18 Nov 2024 12:52:54 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282833

            Bug ID: 282833
           Summary: misc/mc mc syntax is inconsistent between shell
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: danfe@FreeBSD.org
          Reporter: dominique.c.michel@gmail.com
          Assignee: danfe@FreeBSD.org
             Flags: maintainer-feedback?(danfe@FreeBSD.org)

When SHELL=/bin/sh, and running fvwm-crystal on top of fvwm3, if I run 'mc', it
fail to run because of sh lack of support of subshell.

The issue I that the mc syntax become inconsistent between between shells. On
all other shells, I can run 'mc' and it succeed, but with sh and csh, it fail
and that can break existing things.

As example, fvwm rely internally by default on /bin/sh. That part don't concern
mc and works just fine. When running fvwm-crystal as the fvwm config,
fvwm-crystal use the fvwm Exec command to pass commands to the user shell, as
example for its application menu. That application menu is made from the
desktop files provided by the applications in /usr/local/share/applications.
Into the mc.desktop file, we find:

Exec=mc

Which imply that, when the user shell is /bin/sh, fvwm-crystal will fail to
launch mc. If I use shrc to change the user shell to, as example
/usr/local/bin/bash, the mc launcher into the application menu works fine.

When using /bin/sh as user shell, if I define an alias into ~/.shrc:

alias mc='env SHELL=/usr/local/bin/bash mc'

it  works fine when I run 'mc' from a terminal, but fvwm ignore that alias and
the mc application menu launcher start a term, but fail to start mc and close
the terminal.

All that imply that mc, when used into /bin/sh, should assume by default that
its -u option was given. Otherwise, it can break existing software, like as
example the mc launcher into the fvwm-crystal application menu. Not sure about
the other desktops/window managers.

In contrast, if in gentoo linux, I run

env SHELL=/bin/sh mc

mc run fine and when I press CTRL-O, I just get a message that tell me it is no
subshell. But at least it doesn't make mc syntax to be inconsistent between
shells.

-- 
You are receiving this mail because:
You are the assignee for the bug.