ipatalas / vscode-totalcommander

Total Commander Launcher for VS Code
MIT License
3 stars 2 forks source link

Use path to TC from env vars #5

Open osya opened 5 years ago

osya commented 5 years ago

vscode-totalcommander reads environment variable COMMANDER_EXE and store its value in the settings.json. And it doesn't allow to use some environment variables with path to TC in the TotalCommander.path. So it prevents to use the same settings.json synced between multiple machines. vscode-totalcommander should allow to use path to TC from some evironment variable (for example, TOTALCMD_ROOT) in the TotalCommander.path in settings.json

ipatalas commented 5 years ago

If I understand you correctly you'd like to have an option to define path as $TOTALCMD_ROOT and expect this environment variable to be expanded during runtime so that such a setting can be shared across multiple machines? That makes some sense, however the idea behind COMMANDER_EXE is that it's provided by Total Commander itself so there is no need to configure anything if VSCode has been started from Total Commander (environment variables are inherited by child processes).

I'm thinking of settling both of those features to make everybody happy. Instead of taking COMMANDER_EXE and copying it to settings it could just use it only when path is not explicitly provided in the settings. Apart from that your idea could be implemented as well, it should be relatively easy.