Idea for new feature - discuss

Mike Smithson mdooligan at gmail.com
Sun Mar 29 16:14:02 UTC 2015


I agree. What I did was check "Never" on "Pause after run"
and put reads in the menu/ext files where I knew I would
want the pause. Something like this:

+ t r & ! t t
@       Do something on the current file
                 CMD=%{Enter command}
                 $CMD ./%0f
                 read -e -n1 -p'Hit a key... '

Otherwise, if I'm going to type a command that I want to see
the output, like "make", I hit CTRL-O right before I type to go
into terminal mode.



On Sun, 29 Mar 2015 08:12:12 -0700, Ben <2blkbelt at nemontel.net> wrote:

> MC has three config options for what to do after executing files by
> pressing return with the selection on them:
>
> 1 Close the shell every time, returning to MC
> 2 Leave the window open every time, press return to... return
> 3 Close the window only on "dumb" terminals (what?)
>
> Number one leaves you unable to see the output of a command. So you type  
> ls
> and it's kind of useless. Or any other command or script that has output
> you need to see.
>
> Number two works for those things where you need to see output, but if  
> you
> don't, and there are things you routinely execute that do good things for
> you that simply need to be done on command (like turning on house lights,
> my particular thang) then it eventually becomes a bit of annoyance that  
> it
> doesn't just get done.
>
> Now, I may be missing something buried in that "dumb terminal option",  
> but
> it seems to me that this would be a nice solution:
>
> You know how the F4 editor keeps track of what line you're on in which
> file? That's *lovely*.
>
> Well, how about modifying option two so that if you press return, it does
> what it always did, that is, close the shell and return. But if you press
> something else, perhaps ESC or whatever, from then on, when that command  
> is
> run, the shell closes when the run is done.
>
> This implies you'd need an operation to remove the "close" status in case
> the cat stepped on the selected key at the wrong time, but that doesn't
> seem like a high hurdle, lots of room in the menus.
>
> Another approach would be an option to pause only if the command has  
> output
> other than CR and LF, which doesn't require saving file names anywhere,  
> but
> I think that might be a little unsatisfactory as if a command might  
> create
> output or not, you might get a little uncertain if you saw what you  
> thought
> you saw.
>
> Number three... I use the usual terminal types. Are they "dumb"? I have  
> no
> idea. I don't see anything in the OS X shell preferences to variably
> designate the terminal as "dumb" or not based on what's executing, so I'm
> guessing this can't do what I'm thinking. Is it useful to anyone? If not,
> perhaps it could be the "pause only if command produces output" option
> instead.
>
> So, anyone? Feasibility problems? Good? Bad? Stupid? Selfish? Did I
> completely miss or misunderstand a feature?
>
> --Ben



-- 
Peace and Cheer



More information about the mc mailing list