Ticket #4243 (new defect)

Opened 3 years ago

Last modified 2 years ago

Persistent command line buffer for subshell does not work under Mac OS

Reported by: memy Owned by:
Priority: major Milestone: Future Releases
Component: mc-core Version: 4.8.26
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

This feature doesn't work for me under Mac OS 10.15.7
MC behaves as it was before this feature was implemented. When you type a command in the panel then switch to subshell the typed command is not carried over to the subshell and vice versa.

> LC_MESSAGES=C mc -V
GNU Midnight Commander 4.8.26
Built with GLib 2.66.4
Built with S-Lang 2.3.2 with terminfo database
With builtin Editor
With subshell support as default
With support for background operations
With mouse support on xterm
With internationalization support
With multiple codepages support
Virtual File Systems:
 cpiofs, tarfs, sfs, extfs, ftpfs, sftpfs, fish
Data types:
 char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;
> LC_MESSAGES=C mc -F
Home directory: /Users/user
Profile root directory: /Users/user

[System data]
    Config directory: /usr/local/Cellar/midnight-commander/4.8.26/etc/mc/
    Data directory:   /usr/local/Cellar/midnight-commander/4.8.26/share/mc/
    File extension handlers: /usr/local/Cellar/midnight-commander/4.8.26/libexec/mc/ext.d/
    VFS plugins and scripts: /usr/local/Cellar/midnight-commander/4.8.26/libexec/mc/
	extfs.d:        /usr/local/Cellar/midnight-commander/4.8.26/libexec/mc/extfs.d/
	fish:           /usr/local/Cellar/midnight-commander/4.8.26/libexec/mc/fish/

[User data]
    Config directory: /Users/user/.config/mc/
    Data directory:   /Users/user/.local/share/mc/
	skins:          /Users/user/.local/share/mc/skins/
	extfs.d:        /Users/user/.local/share/mc/extfs.d/
	fish:           /Users/user/.local/share/mc/fish/
	mcedit macros:  /Users/user/.local/share/mc/mc.macros
	mcedit external macros: /Users/user/.local/share/mc/mcedit/macros.d/macro.*
    Cache directory:  /Users/user/.cache/mc/
> mc --configure-options
 '--disable-debug' '--disable-dependency-tracking' '--disable-silent-rules' '--prefix=/usr/local/Cellar/midnight-commander/4.8.26' '--without-x' '--with-screen=slang' '--enable-vfs-sftp' 'CC=clang' 'PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig:/usr/local/opt/pcre/lib/pkgconfig:/usr/local/opt/openssl@1.1/lib/pkgconfig:/usr/local/opt/readline/lib/pkgconfig:/usr/local/opt/sqlite/lib/pkgconfig:/usr/local/opt/tcl-tk/lib/pkgconfig:/usr/local/opt/xz/lib/pkgconfig:/usr/local/opt/python@3.9/lib/pkgconfig:/usr/local/opt/glib/lib/pkgconfig:/usr/local/opt/libssh2/lib/pkgconfig:/usr/local/opt/libpng/lib/pkgconfig:/usr/local/opt/s-lang/lib/pkgconfig' 'PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig:/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.15'
> echo $BASH_VERSION
5.1.8(1)-release

Same version of mc and same version of bash running in the same terminal (kitty) works perfect under Linux.

I don't know if the problem is related but every time I run command in the panel I see it duplicated when I switch to subshell. For example:

> ls
> ls
file1 file2 file3

Another observation which may be related or not. It looks like MC corrupts my PROMPT_COMMAND.

Before starting MC my prompt command is something like:

command1;command2;command3

When MC is running the PROMPT_COMMAND is:

command1;command2;command3  pwd>&8;kill -STOP $$

Change History

comment:1 Changed 3 years ago by andrew_b

  • Version changed from master to 4.8.26

comment:2 in reply to: ↑ description Changed 2 years ago by andrew_b

Replying to memy:

> echo $BASH_VERSION
5.1.8(1)-release

I don't know if the problem is related but every time I run command in the panel I see it duplicated when I switch to subshell. For example:

> ls
> ls
file1 file2 file3

As I wrote in ticket:4114#comment:25, such behavior has bash3. Bash4 hasn't, command isn't duplicated. Can't say about bash5, perhaps it works like bash3.

comment:3 Changed 2 years ago by memy

Can't say about bash5, perhaps it works like bash3.

bash5 works fine in Linux so this is not related to the version of bash.
I mentioned before: "Same version of mc and same version of bash running in the same terminal (kitty) works perfect under Linux."

Note: See TracTickets for help on using tickets.