Re: Why does one have to "Press any key to continue" after running a command?
On Tue, 23 Aug 2016, Mike wrote: F9 -> Options -> Configuration... -> Pause after run -> set to Never. OK, I will try that. Right now it is something like "Only on dumb terminals" or similar wording. But the explanation in the man page for this option was not exactly clear. Thanks. On 2016-08-23 10:38, Theodore Kilgore wrote: For example: Running Midnight Commander, with the panels turned on, I do a command such as latex Cntl-Enter (using the Cntl-Enter seqiemce tp bring a filename down to the command line, so that it says latex file.tex Then after the latex command has done its thing one does not get the panel back. Instead, one sees "Press any key to continue" Perhaps there is a good reason for doing things this way, but I cannot figure out what it might be. Also I can not find any option in "man mc" which would look as though it ought to be what one should do to turn this off. Theodore Kilgore ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc -- Peace and Cheer ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: terminal title after exit
On 8/23/16 3:20 PM, Yury V. Zaytsev wrote: > echo -ne '\e[22t' Hello Yury, thanks for your quick responses. I'm not up to patching C (having touched C in over 20 years) so I'll just have to hope for some fix for trash in the future. With respect to the window title, I disabled that and change my command prompt; I like that better anyway. ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: terminal title after exit
On Tue, 23 Aug 2016, Joseph Reagle wrote: On 8/23/16 12:46 PM, Yury V. Zaytsev wrote: On Tue, 23 Aug 2016, Joseph Reagle wrote: mc changes the terminal title; I know I can disable this with xterm_title=0, but I actually don't mind it *if* it restored the title after I exited... Hmmm, on Linux the title is restored after mc exits, but it could be that it is done by bash or vte, rather than mc. Is there any such feature request already on Trac? BTW: this is using homebrew and iTerm2 on Mac. We are not currently saving & restoring the title by ourselves, so it sounds like iTerm2 on Mac is behaves differently from vte on Linux in this respect... Maybe we could do something along the following lines; I haven't even checked whether this compiles, but what it should do is to push the last title on the stack the first time it is updated, and the pop it out upon exiting mc. I don't know if iTerm2 fully supports the title stack feature, but it has the potential to work; if you don't want to patch mc, you can try wrapping the call with echo -ne '\e[22t' mc echo -ne '\e[23t' If that works, would be nice if you could create a nice feature request on Trac with all relevant info or maybe even prepare a clean patch? diff --git a/src/filemanager/layout.c b/src/filemanager/layout.c index 1a02129..12d4619 100644 --- a/src/filemanager/layout.c +++ b/src/filemanager/layout.c @@ -1378,6 +1378,14 @@ update_xterm_title_path (void) { if (mc_global.tty.xterm_flag && xterm_title) { + +static gboolean save_title = TRUE; + +if (save_title) { +fprintf (stdout, "\e[22t"); +save_title = FALSE; +} + char *p; char *path; char *login; diff --git a/src/filemanager/midnight.c b/src/filemanager/midnight.c index 68d12da..6d4f2a8 100644 --- a/src/filemanager/midnight.c +++ b/src/filemanager/midnight.c @@ -1047,6 +1047,10 @@ quit_cmd_internal (int quiet) stop_dialogs (); } +if (mc_global.tty.xterm_flag && xterm_title) { +fprintf (stdout, "\e[23t"); +} + if (q != 0) quit |= 1; return (quit != 0); -- Sincerely yours, Yury V. Zaytsev ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: Using trash on MacOS Homebrew
On Tue, 23 Aug 2016, Joseph Reagle wrote: On 8/23/16 12:44 PM, Yury V. Zaytsev wrote: Sadly, I don't think there is anything you can do other than using libtrash or the like, but I'm not sure whether libtrash has been even ported to macOS. Not that I could see. I wish I could map F8 to a user supplied command. Have a look at the mc.default.keymap : you can't exactly map Delete to a custom command, but, at least, you can unmap it, so that you don't trigger it accidentally. Of course, you can patch delete_cmd() in mc sources, but that requires... err... patching. -- Sincerely yours, Yury V. Zaytsev ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: MC with Tabs
On 8/23/16, Mooffiewrote: > On 8/21/16, Russell Urquhart wrote: >> >> Hi, >> >> I was looking, and found this link: >> >> https://www.midnight-commander.org/ticket/1581 >> >> Has anyone used this, and can this patch be folded into current releases? > > It's very easy to implement such things in mc^2. There's no need to > use C. I'll look into this later today. Done. I've posted an announcement at that ticket. ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: terminal title after exit
On 8/23/16 12:46 PM, Yury V. Zaytsev wrote: > On Tue, 23 Aug 2016, Joseph Reagle wrote: > >> mc changes the terminal title; I know I can disable this with >> xterm_title=0, but I actually don't mind it *if* it restored the >> title after I exited... > > Hmmm, on Linux the title is restored after mc exits, but it could be > that it is done by bash or vte, rather than mc. Is there any such > feature request already on Trac? BTW: this is using homebrew and iTerm2 on Mac. ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: Using trash on MacOS Homebrew
On 8/23/16 12:44 PM, Yury V. Zaytsev wrote: > Sadly, I don't think there is anything you can do other than using > libtrash or the like, but I'm not sure whether libtrash has been even > ported to macOS. Not that I could see. I wish I could map F8 to a user supplied command. For the time being, and if I remember, I type `trash`, mark the files, and then `ctrl+x t` to paste them. ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: Why does one have to "Press any key to continue" after running a command?
F9 -> Options -> Configuration... -> Pause after run -> set to Never. On 2016-08-23 10:38, Theodore Kilgore wrote: For example: Running Midnight Commander, with the panels turned on, I do a command such as latex Cntl-Enter (using the Cntl-Enter seqiemce tp bring a filename down to the command line, so that it says latex file.tex Then after the latex command has done its thing one does not get the panel back. Instead, one sees "Press any key to continue" Perhaps there is a good reason for doing things this way, but I cannot figure out what it might be. Also I can not find any option in "man mc" which would look as though it ought to be what one should do to turn this off. Theodore Kilgore ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc -- Peace and Cheer ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Why does one have to "Press any key to continue" after running a command?
For example: Running Midnight Commander, with the panels turned on, I do a command such as latex Cntl-Enter (using the Cntl-Enter seqiemce tp bring a filename down to the command line, so that it says latex file.tex Then after the latex command has done its thing one does not get the panel back. Instead, one sees "Press any key to continue" Perhaps there is a good reason for doing things this way, but I cannot figure out what it might be. Also I can not find any option in "man mc" which would look as though it ought to be what one should do to turn this off. Theodore Kilgore ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
terminal title after exit
mc changes the terminal title; I know I can disable this with xterm_title=0, but I actually don't mind it *if* it restored the title after I exited... Additionally, if I do `alt-o` instead of exiting, it is nice to see that mc is still running. ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Using trash on MacOS Homebrew
I use the command `trash` on homebrew mac and recently screwed myself in mc when I deleted files and realized it didn't use trash either. Is there an alias, keyboard remapping, or something else that would work on MacOS homebrew? Thanks ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc
Re: MC with Tabs
On 8/21/16, Russell Urquhartwrote: > > Hi, > > I was looking, and found this link: > > https://www.midnight-commander.org/ticket/1581 > > Has anyone used this, and can this patch be folded into current releases? It's very easy to implement such things in mc^2. There's no need to use C. I'll look into this later today. (I haven't bothered with this feature before because I didn't quite see why people would use it. After all, as @Mike wrote, there are tabs in terminal emulators. OTOH, I think I can see why tabs might be useful in some situations.) ___ mc mailing list https://mail.gnome.org/mailman/listinfo/mc