bugGNU Octave - Bugs: bug #44101, history -d: make command history...


bug #44101: history -d: make command history entries deletable

Submitted by:  Lutz Mager <rocketsound>
Submitted on:  Tue 27 Jan 2015 09:54:25 PM UTC  
Category:  Interpreter Severity:  1 - Wish
Priority:  1 - Later Item Group:  Feature Request
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Fri 30 Jan 2015 03:21:04 PM UTC, comment #5: 

@Philip, I've reported your second issue as bug #44132. The GUI should probably sync the history somehow when history_control("erasedups") is enabled.

I think Michael was agreeing that history should be deletable from both GUI and non-GUI.

Mike Miller <mtmiller>
Project Administrator
Thu 29 Jan 2015 09:41:33 PM UTC, comment #4: 

Thanks for the hint, I didn't know about that command. (But there are so many little-used commands.....)

history_control does have a few limitations:

1. ignoredups only works on the previous command.
So running e.g., a short or long) for loop (with a series of different commands) in the debugger will still fill up the history.
This is my main gripe of comment #1.

2. erasedups didn't seem to work at all on my 3.9.0+ build.
What I did is:

history_control erasedups

and then entered a few commands matching commands typed earlier. Nothing changed in the behavior of the history pane.

However, after restarting Octave the duplicates were gone in the history pane and when using the up-arrow key.
So apparently the history pane isn't updated upon calls to 'history_control erasedups'.

As the CLI is part of the GUI, both have the same capabilities as regards history_control. Or do you refer to the OP's request (which I support as well)?

Philip Nienhuis <philipnienhuis>
Project Member
Thu 29 Jan 2015 02:06:06 PM UTC, comment #3: 

This is a useful enhancement and should certainly
be done so that CLI and GUI provide the same capabilities
and settings,

Michael Godfrey <godfrey>
Project Member
Thu 29 Jan 2015 06:19:29 AM UTC, comment #2: 

@Philip: you can do that already using the history_control function. Use `history_control ignore_dups` to have it automatically filter out duplicate lines. Works in both CLI and GUI.

Deleting history entries should just require calling command_history::remove. If this were supported in the GUI, it should probably be supported in CLI with a callable function also. Or it could be an option to the history command, `history -d N` for example, as in bash. Reassigning to the interpreter for now.

Mike Miller <mtmiller>
Project Administrator
Wed 28 Jan 2015 06:11:17 PM UTC, comment #1: 

While we're here, another nice addition would be automatic or semi-automatic removal of duplicate history entries (retain only the last ones).
When debugging a lot of cruft finds its way into the history...

Philip Nienhuis <philipnienhuis>
Project Member
Tue 27 Jan 2015 09:54:25 PM UTC, original submission:  

Add a "Delete" menu item to the right click menu of the command history list (and make sure the Delete also works for a multi-selection of list entries as it does for the other actions available like Copy, ...).

Lutz Mager <rocketsound>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by godfrey (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by rocketsound (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-10-05 mtmiller Priority5 - Normal => 1 - Later
        SummaryMake command history entries deletable => history -d: make command history entries deletable
    2015-01-29 mtmiller CategoryGUI => Interpreter
        Severity3 - Normal => 1 - Wish
        StatusNone => Confirmed
        Release3.8.2 => dev

    Back to the top

    Powered by Savane 3.5