octave-maintainers
[Top][All Lists]
Advanced

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

Re: Interest in selectively deleting history entries.


From: Daniel J Sebald
Subject: Re: Interest in selectively deleting history entries.
Date: Sun, 21 Sep 2014 22:41:13 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

On 09/21/2014 04:23 PM, Philip Nienhuis wrote:
Daniel Sebald wrote
On 09/21/2014 12:50 PM, Philip Nienhuis wrote:
Daniel Sebald wrote
I'm curious what people's thoughts are on the ability to selectively
delete individual lines of history.  What I see it used for, in
<snip>
And it doesn't only hold for Octave but also for shells etc.

Yes, I know.  At least in that case one can clear the screen fairly
quickly.

Sure, but it remains in the shell's history, also for a looong time.

OK, but out of our control.

[snip]

All of this makes me assume that the history entry number makes most
sense
as a per-session counter. But that's just me.

It is per-session, yes.

I'd say just forget about the re-mapping then:

(1) It would add a potentially confusing interpretation layer over command
sequences;

By mapping I meant that the command list needs to include an index number if it doesn't have one already. If a line is deleted, one can no longer compute the line number from where it is in the list.


(2) Your motives appear to lie primarily in the GUI, with wiping inadvertent
lines containing sensitive info.

Yes, that's correct. I myself tend to not use history that much other than to hit up arrow a few times. I generally edit scripts in a file and run them. But now with a GUI, inadvertent passwords are more visible.


Now in the GUI it is extremely easy to select a block of lines with the
mouse cursor and copy them into the editor / terminal / whatever. So I see
little need to painstakingly keep track of what history line number holds
which command, as command and blocks of commands can much more easily be
selected with scroll bars / arrow / PGUP / PGDN keys and a mouse cursor
swipe.
IOW, the need for some specific parts of the history command set gets moot
in the GUI.

That's correct. The GUI doesn't include line numbers in the history window. However, to allow deleting a line from history requires the GUI to send a line number to be precise.


(3) Maybe replace a wiped line by a (hidden?) comment (##) if line numbering
is to remain consecutive (w/o holes).

That would be another way of doing it. If there is a hidden placeholder in the list, one could still compute the line number without having to store it along with the command.

Dan



reply via email to

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