SHRALIAS and command history

ron

Aug 19, 2008
151
0
What determines the amount of history "SHRALIAS" will save to a file when SHRALIAS_SAVE_PATH=c:\ProgramData\JPSoft is set?

The reason I ask is, when starting with this...

history.sav 20,783 08/28/2011 18:36 -a--

D:\>shralias
D:\>history /r history.sav
D:\>shralias /u

I end up with this in c:\ProgramData\JPSoft

history.sav 16,778 09/02/2011 09:54 -a--

The original file has 663 commands and the one saved by SHRALIAS has "255".
 

ron

Aug 19, 2008
151
0
Let's add to the goofy behavior...

In TC13, it's not as destructive. 664 reduced to 628. The diff is easier to analyze here too. SHRALIAS removed all but 4 of the first 41 commands. The remainder are intact when compared to the original.

That's 664 and 628 individual command lines, not bytes.
 

ron

Aug 19, 2008
151
0
It could take a while to track down this issue. I created a simple command file with 2000 individual commands and none were lost using the test below.
 

ron

Aug 19, 2008
151
0
Duplicates. That's the answer. When I sort -u the original file, it's reduced to 255.

So, duplicates exist in the buffer but they get removed on save.

Move to end / save last is my setting.

Somehow I thought TCMD was dynamically removing duplicates from the live buffer.
 
Jun 7, 2008
101
5
On Fri, Sep 2, 2011 at 7:12 PM, ron <> wrote:

> Duplicates. *That's the answer. *When I sort -u the original file, it's reduced to 255.
>
> So, duplicates exist in the buffer but they get removed on save.
>
> Move to end / save last is my setting.
>
> Somehow I thought TCMD was dynamically removing duplicates from the live buffer.

Live duplicate removal has been a wish list item for years. It hasn't
happened because it would take too much code and require too much
overhead to do it on the fly. TCC/TCMD would have to scan the entire
history on every command entered to see if it was a dupe. Ugh. Much
easier to do it once on exit
______
Dennis
 
May 20, 2008
11,400
99
Syracuse, NY, USA
On Fri, 02 Sep 2011 19:12:54 -0400, ron <> wrote:

|Duplicates. That's the answer. When I sort -u the original file, it's reduced to 255.
|
|So, duplicates exist in the buffer but they get removed on save.
|
|Move to end / save last is my setting.
|
|Somehow I thought TCMD was dynamically removing duplicates from the live buffer.

SHRALIAS is pretty straightforward. It just sits on the handles so the
memory-mapped files don't get closed, and dumps them when appropriate; it has no
idea what's in them.

TCC does remove dups (or otherwise honor your preferences) immediately, in the
live buffer as you put it. Just look at the (live) history and you'll see that.
The duplicates were probably removed when the old file (with duplicates) was
read into the active history.
 
May 20, 2008
11,400
99
Syracuse, NY, USA
On Fri, 02 Sep 2011 20:24:48 -0400, DMcCunney <> wrote:

|Live duplicate removal has been a wish list item for years. It hasn't
|happened because it would take too much code and require too much
|overhead to do it on the fly. TCC/TCMD would have to scan the entire
|history on every command entered to see if it was a dupe. Ugh. Much
|easier to do it once on exit

It *is* done live, as far as I can tell I just looked at my recent history ...
saw "ver" seven or eight commands back ... issued "ver" again and now it's at
the end of the history and not where it was before.
 
Similar threads
Thread starter Title Forum Replies Date
rps How to? Shralias and producing history.sav, alias.sav .. Support 6
E Fixed SHRALIAS doesn't work / SHRALIAS.EXE is missing in v20.11.35 Support 2
Mike Applebee SHRALIAS crashes on startup Support 2
Jay Sage Version 17 Installer Leaves Multiple Copies of ShrAlias Support 48
I shralias causes svchost.exe to use 100% cpu Support 10
vefatica Strange behavior reloading SHRALIAS sav files. Support 1
Dmitry L. Kobyakov How to? How to remove the record of the old version of the Take Command? Support 5
D Can alias pass parameters to for command? Support 3
samintz How to? Search for %(command) in Help? Support 1
T VIEW only works from command line Support 14
rconn News Take Command / TCC / CMDebug / TCC-RT v28 Released Support 0
T Take Command 28: Lua reports version 5.4.0 (5.4.3 expected) Support 0
Jay Sage WAD Possible Bug With OPTION Command With @FILE Support 5
rconn News Take Command / TCC / CMDebug / TCC-RT 27.01.24 uploaded Support 0
J Take command does not start on Windows 10 Support 3
vefatica `Back quotes` - command line vs. batch file Support 5
Jay Sage WAD Failure of Alias Command with /Z Option Support 14
Phileosophos Is there any way to open the Take Command options dialog from the command line? Support 8
Phileosophos Command-line Editing Shortkeys That Fail Support 6
fpefpe How to? free (internal) command Support 0
rconn News Take Command / TCC / CMDebug / TCC-RT 27.01.23 uploaded Support 0
T How to? retain command history across reboot? Support 6
rconn News Take Command / TCC / CMDebug / TCC-RT v27.01 Build 22 Uploaded Support 0
Jay Sage Bug With Flow Control and/or Command Grouping Support 2
GermanDirk How to? EVENTLOG Command with simple User Rights not functional Support 4
Jay Sage Take Command Is Too Fast! Support 4
Jay Sage Comparison of IF with Command Group and IFF Support 6
D Open Windows 10 Photos app from command line Support 11
rconn News Take Command / TCC / CMDebug / TCC-RT 27.0.21 uploaded Support 0
rconn News Take Command / TCC / CMDebug / TCC-RT 27.0.20 uploaded Support 0
U Can not get/start Take Command gui Support 1
rconn News Take Command / TCC / CMDebug / TCC-RT 27.0.19 Support 0
S Increasing Font Point Size in Command Tabs Support 2
mfarah Fixed The DATE command produces the wrong error message. Support 1
vefatica Command name mix-up Support 3
FreezerBurnt "Missing SETLOCAL" when initializing Visual Studio Command Prompt. Support 9
E How to? Closing desktop created by DESKTOP command Support 10
rconn News Take Command / TCC / CMDebug / TCC-RT v27.0.18 Support 0
K Take Command fox XP? Support 7
Joe Caverly Documentation Replace internal command with LIBRARY command Support 0
fpefpe How to? command echo in title line/bar Support 2
U Command help on file names Support 5
vefatica Command line DO with no closing parenthesis? Support 9
vefatica Command history search is off Support 7
H How to? How can I say "if the command separator is not ~ then setdos /C~" Support 8
N Command execution slows down in TCC Prompt after a while Support 6
R Long commands retrieved from command history have blank line when wrapped Support 20
jpeni Take Command Language Examples Support 1
rconn News Take Command / TCC / CMDebug / TCC-RT 26.02.41 Uploaded Support 0
fpefpe winfr command Support 4

Similar threads