[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Nick Warne
Subject: Re: [Nano-devel] How to lock a terminal
Date: Wed, 17 Feb 2016 11:53:57 +0000
User-agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.4.0

On 17/02/16 11:25, Bob Proulx wrote:
Since this has nothing to do with bash I have removed bug-bash from
the recipient list.  However I am not subscribed to nano-devel.
Please CC me on responses for this particular branch of the discussion.

Yes, my fault, sorry Bob, should have sat on my hands for a day before shipping off the mail.

(more below):

Benno Schulenberg wrote:
Bob Proulx wrote:
> I do not have a nanorc file at all.  The defaults are okay for
> suspension without any specific configuration.

   address@hidden:~$ ll .nanorc
   ls: cannot access .nanorc: No such file or directory

??  How does that work?

It works just as I showed verbatim.  I will switch machines for ease
of my testing but will repeat the test case to verify that it doesn't
change things for me.

   address@hidden:~$ nano /var/log/messages | grep a
   ... I press ^Z here ...
   [1]+  Stopped                 nano /var/log/messages | grep a
   address@hidden:~$ jobs
   [1]+  Stopped                 nano /var/log/messages | grep a
   address@hidden:~$ kill %1
   Received SIGHUP or SIGTERM
   [1]+  Terminated              nano /var/log/messages | grep a
   address@hidden:~$ jobs

What version of nano are you using?

I am using Debian Stable Jessie 8 and the nano packaged stock for it.

   address@hidden:~$ nano --version
    GNU nano version 2.2.6 (compiled 16:56:37, Jul 16 2014)
    (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
    2008, 2009 Free Software Foundation, Inc.
    Email: address@hidden    Web:
    Compiled options: --disable-wrapping-as-root --enable-color --enable-extra 
--enable-multibuffer --enable-nanorc --enable-utf8

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

I know very little about details of nano but I am happy to supply data
as requested.

   address@hidden:~$ nano --help | grep sus
    -z             --suspend               Enable suspension

Do you have an alias?


   address@hidden:~$ type nano
   nano is hashed (/usr/bin/nano)

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

No.  Sorry.  I am running an X desktop using XTerm version 312 running
bash 4.3.  I only very seldom run nano and only ran it in order to
verify that job control would work okay before I sent that response.

Since you seemed interested I investigated further and found:

   address@hidden:~$ grep suspend /etc/nanorc
   ## Allow nano to be suspended.
   set suspend

Then didn't see anything in the package README.  Looking in the
package subversion history I find that setting in the earliest
imported copy on 2008-08-27.  It has been there for a long time.
Looking in the package changelog I find this.

   nano (1.1.6-1) unstable; urgency=low

     * debian/nanorc: some Debian defaults: disables wrapping by default,
       enables suspending and multibuffers (fixes #127634 for sid).

    -- Jordi Mallach <address@hidden>  Fri, 25 Jan 2002 18:49:42 +0100

Therefore I believe the packager for Debian has set that option.
Which seems reasonable to me.  And it has been that way for quite a
long time (14 years) if it entered the package in 2002.

And so there the mystery is solved.

Ctrl-Z doesn't work for me:

(On Slackware, home brew build):

 GNU nano, version 2.5.1
 (C) 1999..2016 Free Software Foundation, Inc.
 Email: address@hidden  Web:
 Compiled options: --disable-wrapping-as-root --enable-utf8

...but as alpha stated, Ctrl+X does close that 'nano /path/to/something | grep a'

Gosh that takes me back... or is it forward?  That's the trouble with
time travel, you never can tell."
                -- Doctor Who "Androids of Tara"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]