Unable to delete items in Command line history section

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
vicray
Junior Member
Junior Member
Posts: 14
Joined: 2003-06-22, 23:13 UTC
Location: Vic, Catalonia, Spain

Unable to delete items in Command line history section

Post by *vicray »

Cannot figure this one out.

Whenever I
a) manually delete some or even all of the history items in my [Command line history] section in wincmd.ini,
b) save the new file, and
c) restart Totcmd

my wincmd.ini has reverted to its original state, ie., all my history items are back.

QUESTIONS:

a) How is that possible?
b) How can I *definitely* delete all or some of my history items in the [Command line history] section?

-----------------
Vicray

Note: Other manual changes in wincmd.ini persist after a restart
User avatar
Vansumsen
Power Member
Power Member
Posts: 761
Joined: 2003-11-09, 08:16 UTC
Location: Belgique
Contact:

Post by *Vansumsen »

Perhaps you have 2 wincmd.ini in your computer
:?:
First of all:
Help >> About Total Commander
Read the path of the wincmd.ini
Is it the good wincmd.ini that you have edit ?
Regards
Paul
Ouistiti, #11943

L'important n'est pas de convaincre, mais de donner à réfléchir.
The important thing is not to convince, but to incite to think.

1,77245385090552...
User avatar
vicray
Junior Member
Junior Member
Posts: 14
Joined: 2003-06-22, 23:13 UTC
Location: Vic, Catalonia, Spain

Post by *vicray »

Just one wincmd.ini, in Tcmd dir.
As I say in my note, all other changes to the ini file stick, so I must be using the good ini file. It's only the command line history section that doesn't let me modify it.

Thx
------------
Vicray
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Another way--- ?

Post by *Clo »

2vicray
:) Hello !
• You can avoid all command-lines saving unchecking the box in Configuration >>> Options >>> Operation >>> section : "Save on exit" -> Old command lines >> Apply button >> OK
• But you're right, it's impossible to remove only some lines in <wincmd.ini>, even if you remake the lines numbering and save the file... Bug or feature ?
* In my opinion, it should be rather a bug…
* Hoping that the Author will explain us what happens. :?:

:mrgreen:  Kind regards,
Claude
Clo
Last edited by Clo on 2004-05-08, 23:03 UTC, edited 1 time in total.
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
CoMiKe
Senior Member
Senior Member
Posts: 285
Joined: 2003-05-05, 17:45 UTC
Location: Salamanca, Spain

Post by *CoMiKe »

my wincmd.ini has reverted to its original state, ie., all my history items are back.
Well, this is what it's happening:

1) Open wincmd.ini
2) Make modifications.
3) Save config
4) Close TC.

At this moment, when you close TC, it writes the config file, and it has that paths in memory, so it writes back to the config file.

So you must edit wincmd.ini when you have no instance of totalcmd open.

Good luck!
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Re: Unable to delete items in Command line history section

Post by *Sheepdog »

vicray wrote: a) How is that possible?
It seems that TC loads the List while starting from wincmd.ini but manages it in ram. It updates the list in wincmd.ini when TC is closed.

vicray wrote: b) How can I *definitely* delete all or some of my history items in the
You just have to close all instances of TC. Then edit your command history section in wincmd.ini. After saving you can open TC again and will find your edited history in the command-line.


sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Waiting an improvement---

Post by *Clo »

2CoMiKe
:)  Hello !
• Right, that works like you tell. However, that doesn't seem normal, with regard to all other changes in <wincmd.ini> which are alright saved; I mean : from the Configuration pages. Indeed, they have an "Apply" button.
So, a similar command might exist to save such changes for the command line history section.
- For instance, either a local menu on the command-line list, allowing to remove a marked row (the highlighted line over which the cursor is), or even simply the <DEL> key.
• Thanks for the trick, I'll add this certainly in the Tutorials, waiting an improvement in TC… :wink:

:mrgreen:  Kind regards,
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
pdavit
Power Member
Power Member
Posts: 1529
Joined: 2003-02-05, 21:41 UTC
Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
Contact:

Re: Waiting an improvement---

Post by *pdavit »

Clo wrote:However, that doesn't seem normal, with regard to all other changes in <wincmd.ini> which are alright saved; I mean : from the Configuration pages. Indeed, they have an "Apply" button.
Well, it can be considered normal since most applications behave in the same manner.

Changes on the ini file sourced from the configuration window are appended actually with memory resident info. One state does not overwrite the other one. Even taking out a setting (not manually) is an appending process or more accurately a reverse-appending process. ;)

The tricky bit in the whole idea (bring into the equation the manual editing), is when you take a snapshot to observe ini info changes. :roll:
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
User avatar
vicray
Junior Member
Junior Member
Posts: 14
Joined: 2003-06-22, 23:13 UTC
Location: Vic, Catalonia, Spain

Post by *vicray »

2 CoMike & Sheepdog

Thnx a lot for answering my two questions. Now I know. I was driving nuts.

I sympathize with Clo's reasoning, though.

-------------
Vicray
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

A handy system---

Post by *Clo »

:D  >>> To everybody :

• This problem has been already discussed, but none improvement had been made in TC…
* Hence, what do you think about that ?
http://perso.wanadoo.fr/charries/relais/idea.html#sup

• It should be handier than to edit in the conditions explained above…
• Sorry, I found nothing for the Keyboard Knights
… but I'm pretty sure that they will propose some simple keys combinations like Ctrl+Shift+5Num+Del or so ! :P

:mrgreen:  Kind regards,
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Re: A handy system---

Post by *Sheepdog »

Clo wrote: * Hence, what do you think about that ?
http://perso.wanadoo.fr/charries/relais/idea.html#sup
I think it would be much more desirable to have an inbuilt editor for all the history-entries:
- commandline history
- directory history
- searchname
- searchin
- searchtext
- selection
- renametemplates
- dirmenu

But if Christian would implement only a quick one-button solution I'd prefer a button to reread the wincmd.ini - so you could edit wincmd.ini with your editor and then make sure TC takes on the changes immediately.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
pdavit
Power Member
Power Member
Posts: 1529
Joined: 2003-02-05, 21:41 UTC
Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
Contact:

Re: A handy system---

Post by *pdavit »

Sheepdog wrote:But if Christian would implement only a quick one-button solution I'd prefer a button to reread the wincmd.ini - so you could edit wincmd.ini with your editor and then make sure TC takes on the changes immediately.
I second that!
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Let's be realistic...

Post by *Clo »

2Sheepdog
:) Hello Stefan !
I think it would be much more desirable to have an inbuilt editor…
• Indeed! But I attempt to be realistic : the smallest simple text-editor I have in my PCs is ~12 KB … It could be a bit smaller if embedded in the program, but not less than 10 KB or around, I guess.
* So, the eternal problem of the program-size-in-the-holy-diskette comes back immediatly.
* I would be in favour of such an editor, because it should allow to create an extra menu "Edit" from which we'ld edit all lists you quote, and only the wanted INI file.
But if Christian would implement only a quick one-button solution I'd prefer a button to reread the wincmd.ini …
• The "Save" buttton I propose must do that, of course ! It might work quite like the "Apply" buttons in the Configuration-sheets:
1. Writes in the appropriate section of <wincmd.ini>
2. Reread the file
3. Reload the modified file in memory immediatly.
* Using in first the "Remove" button, you would not have to edit anything, and that doesn't bind you to close TC…
• Apart, I am too in favour of the JB's idea in the old thread :
http://ghisler.ch/board/viewtopic.php?t=1303&start=0&postdays=0&postorder=asc&highlight=commandline+history
about separated *.ini files.
• Another way could be to get a plugin tool, but a suitable one doesn't exist yet (it seems…); moreover : more plugins, more problems ! I don't like TC looking like "a gasworks" :lol:

:mrgreen:  Friendly regards,
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Re: Let's be realistic...

Post by *Sheepdog »

Clo wrote:* So, the eternal problem of the program-size-in-the-holy-diskette comes back immediatly.
Christian will start this year to distribute TC on CD. (referring his posting )

• The "Save" buttton I propose must do that, of course ! It might work quite like the "Apply" buttons in the Configuration-sheets:
1. Writes in the appropriate section of <wincmd.ini>
2. Reread the file
3. Reload the modified file in memory immediatly.
If you edit your Tab-configuration in a editor and want TC to take it over and then push 'save' : How should TC know if you want to have the actual tab configuration saved or the on in the wincmd.ini?

I think a separate function is needed: reload configuration from wincmd.ini.
* Using in first the "Remove" button, you would not have to edit anything, and that doesn't bind you to close TC…
My intention is not to close TC too. I want TC to reload the settings as you can change the paths with option /O.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
Post Reply