Off-Topic > Off-Topic - Tiny Core Lounge
Midnight Commander Subshell
(1/1)
SamK:
As there are MC users around here I am hoping someone may have a tip or trick to offer.
Switching between the MC normal interface and the subshell works fine using the keystroke CTL+o. Extensive use is made of personally created entries in the MC "User Menu" to run tasks. These automatically open the MC subshell and display the task progress, then automatically close it upon task completion.
In 90% of cases this behaviour is exactly what I want and have set it up this way in Options-->Configuration-->Pause after run-->Never.
For the remaining 10% of cases it would be convenient to have the subshell display remain open once the task has completed, awaiting a keystroke (i.e. the usual CTL+o) before returning to the usual MC interface diaplay.
Does anyone know a way of doing this?
Note:
I have found an impractical, clumsy way of delaying the closing of the subshell display, by appending a sleep X command at the end of the task entry in the "User Menu". This is not really suitable as:
* The subshell automatically closes on expiry of the sleep period rather than remaining open pending a manual keystroke
* Manually switching to the MC interface (CTL+o) during the sleep period suspends the sleep countdown, which resumes upon switching back to the subshell display.
bmarkus:
Stock shell doesn't support subshell. Try bash.
gerald_clark:
I just enter 'sh' on the command line and 'exit' when through.
Can't switch back and forth though.
Rich:
Hi SamK
Can you use the busybox nc command to listen to some port, then hit Ctrl-c when you want
to resume?
nc -l -p 2222
SamK:
As so often seems to be the case, shortly after posting the question I stumbled on to an answer. It turns out to be exactly the same as the idea from gerald_clark, which works just fine.
Thanks to each of you for your suggestions.
Navigation
[0] Message Index
Go to full version