Opened 8 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 by Lewis Rosenthal, 7 years ago

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 would be quite useful, Gregg.

Last edited 3 years ago by Lewis Rosenthal (previous) (diff)

comment:2 by Steven Levine, 6 years ago

Milestone: Version-3.09Version-3.10

Ticket retargeted after milestone closed

comment:3 by Gregg Young, 3 years ago

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 by Gregg Young, 3 years ago

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.