[Top][All Lists]

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

Re: [ANNOUNCE] nano-8.0 is released

From: Ralph Corderoy
Subject: Re: [ANNOUNCE] nano-8.0 is released
Date: Wed, 01 May 2024 15:02:45 +0100

Hi Benno,

> • To open a file at a certain line number, one can now use also
>    `nano filename:number`, besides `nano +number filename`.

This smells wrong.  How do I now edit a file called ‘foo:42’?  A quick
skim of
suggests I must escape the colon with a backslash.  But that's abnormal.
Other Unix commands don't need me to do that.  The shell's file
completion won't do it for me.

I don't see a good alternative.  nano can't check for foo:42 and open
that if it exists as it's still ambiguous whether I wanted that or
‘+42 foo’.  And adding more rules depending on which of those two exist
just adds to the user's cognitive load and possible confusion.

Other points from looking at that part of the source.

- The ‘+42’ is checked for errors and the user told, ‘Invalid line or
  column number’, whereas a faulty ‘foo:42’ has the colon skipped so the
  ‘:42’ is part of the filename and a later colon has a stab,
  e.g. ‘foo:bar:314’.

- ‘nano +1 foo:2’ edits foo at line number 2.  The +1 is silently
  ignored.  As a beginner's editor, I'd expect them to be told of the

I suggest this new ‘:42’ filename-suffix feature is removed.  It's alien
to Unix and doesn't marry well with the existing option interface.

Cheers, Ralph.

reply via email to

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