Page 1 of 1

[Feature Requesst] Add a command `cm_ReloadSettings`

Posted: 2022-05-25, 08:24 UTC
by Troy_Daniel
For someone who likes to modify the settings file directly, it is a boring thing to close and reopen TC. So it would be great if there is a command `cm_ReloadSettings`.

Re: [Feature Requesst] Add a command `cm_ReloadSettings`

Posted: 2022-05-25, 16:24 UTC
by jinsight
Support++

Such a command would be a little more convenient than starting another instance to see if the setting change was as expected.

Re: [Feature Requesst] Add a command `cm_ReloadSettings`

Posted: 2022-05-25, 17:05 UTC
by ghisler(Author)
It would be very difficult because not all options are loaded in the same place, some are only loaded when using a specific tool like Search or Lister. Just use a tool like tinny(?)/tiny TC restarter:
http://totalcmd.net/plugring/tinnytcrestarter.html

Re: [Feature Requesst] Add a command `cm_ReloadSettings`

Posted: 2022-05-25, 23:43 UTC
by petermad
2Troy_Daniel
I use these two commands to restart TC in the same place as it where, even when auto-save of Directories ase disabled:

Code: Select all

[em_newcommander]
cmd=%COMMANDER_EXE% /N /P /A /i="%COMMANDER_INI%"
param=%Z%X %P%N* %T%M*
menu=Open New Instance of Total Commander
button=%COMMANDER_EXE%

Code: Select all

[em_restartcommander]
cmd=em_newcommander, cm_Exit
button=%COMMANDER_EXE%
menu=Restart Total Commander
Using this command you will lose opened Folder tabs, current Sort order and File spec. etc. if auto-save of Panels is turned off.

Re: [Feature Requesst] Add a command `cm_ReloadSettings`

Posted: 2022-05-26, 06:50 UTC
by Troy_Daniel
ghisler(Author) wrote: 2022-05-25, 17:05 UTC not all options are loaded in the same place,
I originally hope to reload the options in `wincmd.ini` and `usercmd.ini` as well as the related redirected options. But here, as suggested by
petermad wrote: 2022-05-25, 23:43 UTC restart TC in the same place as it where
, I think it a good solution. And with some commands added as

Code: Select all

[em_RestartCommander]
cmd=cm_ConfigSavePos, cm_ConfigSaveSettings, cm_ConfigSaveDirHistory, em_NewCommander, cm_Exit
button=%COMMANDER_EXE%
menu=Restart Total Commander
Namely, the `cm_ConfigSavePos, cm_ConfigSaveSettings, cm_ConfigSaveDirHistory, `, however, I'm not sure whether it helps conserve more information. At least, I'm satisfied with this solution. Thank you, all guys.

Re: [Feature Requesst] Add a command `cm_ReloadSettings`

Posted: 2022-05-26, 14:25 UTC
by petermad
I have found that if I use:

Code: Select all

[em_newcommander]
cmd=%COMSPEC% /C
param=%Z%X start "" "%%COMMANDER_EXE%%" /N /P /A /i="%%COMMANDER_INI%%" %P%N* %T%M*
menu=Open New Instance of Total Commander
button=%COMMANDER_EXE%
Instead of:

Code: Select all

[em_newcommander]
cmd=%COMMANDER_EXE% /N /P /A /i="%COMMANDER_INI%"
param=%Z%X %P%N* %T%M*
menu=Open New Instance of Total Commander
button=%COMMANDER_EXE%
The instance number in TC's title is kept the same, while the second method toggles the instance number back and forth each time the command is run.