Skip to content

mc ignores $PS1 on macOS #4723

@mivk

Description

@mivk

Is there an existing issue for this?

  • I have searched the existing issues

Midnight Commander version and build configuration

GNU Midnight Commander 4.8.33
Built with GLib 2.82.4
Built with S-Lang 2.3.3 with terminfo database
Built with libssh2 1.11.1
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, shell
Data types:
 char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64; uintmax_t: 64;

Operating system

Darwin cat.andromeda.lan 24.5.0 Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:25 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T6020 arm64

(MacOS 15.5)

Is this issue reproducible using the latest version of Midnight Commander?

  • I confirm the issue is still reproducible with the latest version of Midnight Commander

How to reproduce

When I start mc, it ignores the PS1 variable I had exported, and resets the prompt to bash-3.2$.

This is on MacOS 15.5, with the default shell set to Bash (v. 3.2.57 on Mac)

In .profile, I set PS1 as:

export PS1='\[\e]2; $PWD \a\e[32;1m\]\h:$PWD/$\[\e[0m\] '

But when I start mc, I have:

bash-3.2$ echo $PS1
\s-\v\$
bash-3.2$ 

I must re-execute the export PS1=... command to get back my prompt (though without the colors, but that is ok).

Expected behavior

The mc subshell should keep the value of $PS1

Actual behavior

$PS1 gets replaced.

Additional context

I don't have this problem on a different machine with MacOS 15.5 but with Midnight Commander version 4.8.28

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageNeeds triage by maintainersprio: mediumHas the potential to affect progress

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions