adamyg / mcwin32

Midnight Commander for Windows
https://sourceforge.net/projects/mcwin32/
210 stars 14 forks source link

Subshell does not work #51

Open Ejsstiil opened 1 year ago

Ejsstiil commented 1 year ago

When Ctrl+O is pressed the panels hide but you can't type anything in the subshell - there is no a subshell. Is this feature supported on the Windows build? Tested in wt, powershell, cmd

adamyg commented 1 year ago

subshell is not enabled/suitable under a windows console.

Ejsstiil commented 1 year ago

Strange assumption as this is the crucial thing about MC. The benefit of having a subshell under mc is obvious. Without that it is not the mc as we knows it(linux). Could you please add the support of it but leave it disabled by default?

adamyg commented 1 year ago

Sharing the window's console is problematic, enabling sub-shell requires specific job and terminal control features of the underlying terminal, plus the sub-shell command(s) need to be well behaved console application's. Window's 10 Pseudo Console/ConPTY may provide a solution (winxsh), only with reasonable devl effort.

Ejsstiil commented 1 year ago

I understand, that's bad news... Would be possible to do it in some alternative way - that the mcwin will launches two consoles so one will be consumed by mcwin and the second one would be brought-up by ctrl+o ? The only thing would be just to maintain the current pwd in both? Just thoughts.

adamyg commented 1 year ago

would need to re-implement: src/subshell/common.c, using ConPTY for the sub-shell

kjdro commented 11 months ago

how about using git bash ? i can run mc from there

adamyg commented 10 months ago

Still considering, effort for a feature i generally disable under Linux and other hosts. Tabbed terminal as alt?

AndreKR commented 6 months ago

Still considering, effort for a feature i generally disable under Linux and other hosts.

Then what do you even use mc for? I generally use it to navigate to the directory where I want to execute commands. You use it for file operations (copy, move) only?

AndreKR commented 6 months ago

Here's an idea that should be quick(er) to implement: There is already a working command prompt if you have it enabled (Options > Layout > Command prompt). Maybe when it's disabled (which is necessary to enable quick navigation by typing) on Ctrl+O you could show that same command line?

DougDavenport commented 2 months ago

Greetings, I also miss using Ctrl+O to open a shell in the current directory and this is my work around.

I run mc in a tab of Windows Terminal. Edit your menu file and add the following:

o       Open new terminal tab in current directory
        wt -w 0 new-tab -d %d

now F2+o will open a new Windows Terminal tab in the current mc directory

hope this helps