nano-devel
[Top][All Lists]
Advanced

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

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


From: Bob Proulx
Subject: Re: [Nano-devel] How to lock a terminal
Date: Wed, 17 Feb 2016 19:25:53 +0800
User-agent: Mutt/1.5.24 (2015-08-30)

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.

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
  address@hidden:~$ 
  [1]+  Terminated              nano /var/log/messages | grep a
  address@hidden:~$ jobs
  address@hidden:~$

> 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: http://www.nano-editor.org/
   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?

No.

  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.

Bob



reply via email to

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