Opened 7 years ago

Closed 3 years ago

#42 closed enhancement (fixed)

Add a /N switch to the history command

Reported by: Gregg Young Owned by: Gregg Young
Priority: minor Milestone: Version-3.10
Component: Commands Version: 3.08
Keywords: Cc:

Description

/N would add the item to the history list only if it not already there.

Change History (4)

comment:1 Changed 7 years ago by Lewis Rosenthal

As a bit of a workaround, in my XWP Shutdown folder, I have an object which does this:

4OS2.EXE /c "history | perl -ne '/;/ or print unless $seen{$_}++' > C:\HOME\DEFAULT\.history && delay"

This filters out those lines where I've mistakenly hit ";" instead of ":" (I should improve that to limit those to only those lines containing one letter before the semicolon, I 'spose) and non-unique lines. Thus, multiple occurrences of dir, cd, etc. get filtered when saving the history for re-reading at next startup.

This is no substitute for not cluttering up the list with the dupes in the first place, of course, so your RFE wouldbe quite useful, Gregg.

Version 0, edited 7 years ago by Lewis Rosenthal (next)

comment:2 Changed 5 years ago by Steven Levine

Milestone: Version-3.09Version-3.10

Ticket retargeted after milestone closed

comment:3 Changed 3 years ago by Gregg Young

Owner: set to Gregg Young
Status: newassigned

This is intended to check for dups when using /a. Consider changing /a to do this.

comment:4 Changed 3 years ago by Gregg Young

Resolution: fixed
Status: assignedclosed

Rev 38287, 38309 HistNoDups?=yes in INI makes /a add the item to the history list only if it not already there.

Note: See TracTickets for help on using tickets.