Fix and enhance enhance_path_recursive #2311
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reasons for these changes
I am using Cmder for the first time for a job where I am working from unfamiliar territory, a Windows VM. It's an opportunity to use Cmder in many ways using other tools others users have and I am embracing it fully. I am making every effort to do things in a portable way so I can simply zip the Cmder folder and move my env wherever I want with minimal manual reconfiguration.
The daily use of Cmder has made the changes in this PR seem very obvious to me.
Fixes
enhance_path_recursive. It was not adding directories properly.Adds
enhance_path_recursiveonly enhances the path if a[*.COM|*.EXE|*.BAT|*.CMD|*.PS1|*.VBS]file is in the folder.%cmder_root%/optand Add%cmder_user_config%/optfolders for optional package folders that are not added to thePATHso the user can control exactly what folders get added. This might be necessary if usinginit.bat /max_depth [1-5].Changes
README.mdNote: This is useful for vscode integration where args cannot be passed via
settings.json. See: VSCode integration results in an inconsistent environment #2299%nix_tools%%fast_init%%debug_output%%verbose_output%%max_depth%%CMDER_CONFIGURED% == 1skip to Cmder User Config without running Cmder config. Allows re-runninginit.batinside a session to test user settings changes without starting a new shell or when using vscode integration and vscode is launched from a Cmder session. See VSCode integration results in an inconsistent environment #2299