Re: [Nano-devel] How to lock a terminal

2016-02-17 Thread Benno Schulenberg

On Wed, Feb 17, 2016, at 04:11, Bob Proulx wrote:
> Benno Schulenberg wrote:
> > For that to work, it requires having 'set suspend' in your
> > nanorc.  (Which I don't have, because it annoys me when nano
> > drops into the background when I accidentally hit ^Z.)
> 
> I do not have a nanorc file at all.  The defaults are okay for
> suspension without any specific configuration.

??  How does that work?  What version of nano are you using?

Here 'nano --help | grep sus' says:
 -z --suspend   Enable suspension
meaning that it is off by default.

Do you have an alias?  If not, then you have a strange terminal,
that catches ^Z before it reaches the running program.

Benno

-- 
http://www.fastmail.com - Email service worth paying for. Try it for free




Re: [Nano-devel] How to lock a terminal

2016-02-16 Thread Ángel González
Benno Schulenberg wrote:
> On Tue, Feb 16, 2016, at 11:19, Bob Proulx wrote:
> > [...] this is the perfect case for job control.  No need for a
> > second terminal.  Here is an example.  Use Control-Z to stop the
> > foreground job.
> 
> For that to work, it requires having 'set suspend' in your
> nanorc.  (Which I don't have, because it annoys me when nano
> drops into the background when I accidentally hit ^Z.)
> 
> Luckily one can toggle suspendability on with M-Z, but...
> somehow that doesn't seem to work when nano is screenless.
> 
> When I use nano with --ignorercfiles, M-Z does work.
> Maybe the colors do something strange with the pipe?
> 
> And when I use LANGUAGE=en, it works too.  Ha!
> Esperanto pisses off the pipe, too.  :)
> 
> Benno


M-Z Ctrl-Z works for me with that testcase. While Ctrl-Z is a generic
solution, I don't think it is reasonable an expectation of M-Z to
enable it, as it is really domain-specific.



Re: [Nano-devel] How to lock a terminal

2016-02-16 Thread Benno Schulenberg

On Tue, Feb 16, 2016, at 11:19, Bob Proulx wrote:
> [...] this is the perfect case for job control.  No need for a
> second terminal.  Here is an example.  Use Control-Z to stop the
> foreground job.

For that to work, it requires having 'set suspend' in your
nanorc.  (Which I don't have, because it annoys me when nano
drops into the background when I accidentally hit ^Z.)

Luckily one can toggle suspendability on with M-Z, but...
somehow that doesn't seem to work when nano is screenless.

When I use nano with --ignorercfiles, M-Z does work.
Maybe the colors do something strange with the pipe?

And when I use LANGUAGE=en, it works too.  Ha!
Esperanto pisses off the pipe, too.  :)

Benno

-- 
http://www.fastmail.com - IMAP accessible web-mail




Re: [Nano-devel] How to lock a terminal

2016-02-15 Thread alpha
On Mon, 15 Feb 2016 17:24:06 +
Nick Warne  wrote:

> I ma not sure if this is a bug, or if it is what causes it - if it 
> isn't, then it is me being stupid.
> 
> I was in a SSH session, and checking something inadvertently issued:
> 
>  > nano /var/log/messages | grep a
> 
> (I was searching for something else than an 'a', but the above
> example shows the issue - about to use 'nano', but then forgot to
> change it to 'cat').
> 
> The terminal just sits there doing nothing - CTRL+C doesn't do
> anything; in a SSH session, the only option is to kill the terminal.
> On a local machine, you can use kill -9 from another terminal to get
> out of it.
> 
> I don't know if this behaviour is expected or me being stupid, or 
> something else going on.

I did the same thing about a week ago. You can press CTRL+X to close nano and 
get back to the shell.