nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] [PATCH] Improve execute command prompt try 2


From: Benno Schulenberg
Subject: Re: [Nano-devel] [PATCH] Improve execute command prompt try 2
Date: Sun, 10 Sep 2017 21:33:03 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1


Op  7-09-2017 om 08:53 schreef Marco Diego Aurélio Mesquita:
The attached patch series is identical to the last one except for
three things: it fixes some comments and whitespace and adds syntax
highlighting to the keyword "executelog" in nanorc.

I will accept the second patch, by itself.  I don't like it much
when the previous command is given, between brackets, in the prompt.
That the search command has this is an inheritance from pico, which
doesn't have the M-W (search again) command, so the best they could
do was to have a two-key search-again: ^W <Enter>.  In nano, an
execute-again would be at least three keystrokes: ^R ^X <Enter>.
I don't think it is much worse to make it four strokes: ^R ^X <Up>
<Enter>.  Also, I imagine, you don't want to run the exact same
command again, but a small variant, so you will use <Up> anyhow.
Furthermore, search strings tend to be short, commands a little
longer.  When a long command fills up a third of the prompt bar,
and the execute prompt itself takes up some space too, then about
forty percent of the width remain to edit the next command. And
when editing a new command, the old one between brackets is
useless.  So I think it's better not to put it there.

The persistence patch costs too much code, and I'm not convinced
people want these commands to be remembered across sessions.
(By the way: you haven't properly renamed all variables after
copy-pasting the code: 'searchhist' ought to be 'executehist'.)

(Also: the dots in the first patch don't seem to be working.
Run src/nano, type ^R ^X and hold x until the cursor is near
the end of the prompt bar.  Then press <Enter> followed by
^R ^X.  There is no "..." at the end of the exes.  But... I
remember having seen it once, after a long ls command.)

Benno




reply via email to

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