Implement Shift+Del to remove cruft from the history of: the Command Line comboBox
ClosedPublic

Authored by asensi on Apr 19 2020, 11:11 PM.

Details

Summary

When Krusader users utilize the Command Line comboBox (internally named
CmdLineCombo) on the main window: they often see bad entries because there are
obsolete ones, mistakes and so on, but normal Krusader users can't remove those
entries. For example, web browsers have Shift+Del in order to remove the
thwarting entries.

With a KrHistoryComboBox, Krusader users are able to delete wrong entries from
history lists, and therefore they can remove those bad suggestions that they
were seeing.

Test Plan

Open Krusader, go to "Settings > Show Command Line", the Command Line comboBox
appears (reminder: it's not the embedded terminal), type ls and press Return.
Delete the previously typed command from the comboBox:
a) using Shift+Del when the popup list is seen;
b) or using the arrow keys and Shift+Del when the popup list is not visible.

Close Krusader. Check that in the ~/.config/krusaderrc file: now it's seen
cmdline history=ls or similar.

Open Krusader again. Go to the Command Line comboBox again. Try to delete all
the typed commands until the list is empty, press Shift+Del again. Monitor the
changes in the ~/.config/krusaderrc file

Perform similar experiments with other commands (for example ls /tmp and `ls
/`), having more commands available in the comboBox.

Execute a command, e.g. touch /tmp/trying and check that the file is created,
just in case.

Note: Those changes are designed to be tried after applying the ones
described in https://phabricator.kde.org/D28963

Diff Detail

Repository
R167 Krusader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
asensi requested review of this revision.Apr 19 2020, 11:11 PM
asensi created this revision.
asensi edited the summary of this revision. (Show Details)Apr 21 2020, 10:32 PM
asensi edited the test plan for this revision. (Show Details)
gengisdave accepted this revision.Apr 30 2020, 9:17 AM
gengisdave added a subscriber: gengisdave.

Compiled and tested, no problems found

This revision is now accepted and ready to land.Apr 30 2020, 9:17 AM
This revision was automatically updated to reflect the committed changes.