From 01667a5bf0c675b94184956c7a0c86754418f96a Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Mon, 7 Mar 2016 08:12:50 -0600 Subject: [PATCH] Process profile.d scripts before adding user aliases --- vendor/init.bat | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/vendor/init.bat b/vendor/init.bat index 1409b9f..4fc232c 100644 --- a/vendor/init.bat +++ b/vendor/init.bat @@ -61,6 +61,18 @@ if defined GIT_INSTALL_ROOT ( :: Enhance Path set "PATH=%CMDER_ROOT%\bin;%PATH%;%CMDER_ROOT%\" +:: Drop *.bat and *.cmd files into "%CMDER_ROOT%\config\profile.d" +:: to run them at startup. +if not exist "%CMDER_ROOT%\config\profile.d" ( + mkdir "%CMDER_ROOT%\config\profile.d" +) + +pushd "%CMDER_ROOT%\config\profile.d" +for /f "usebackq" %%x in ( `dir /b *.bat *.cmd 2^>nul` ) do ( + REM echo Calling %CMDER_ROOT%\config\profile.d\%%x... + call "%CMDER_ROOT%\config\profile.d\%%x" +) +popd :: make sure we have an example file if not exist "%CMDER_ROOT%\config\aliases" ( @@ -90,20 +102,6 @@ if defined CMDER_START ( cd /d "%CMDER_START%" ) -:: Drop *.bat and *.cmd files into "%CMDER_ROOT%\config\profile.d" -:: to run them at startup. -if not exist "%CMDER_ROOT%\config\profile.d" ( - mkdir "%CMDER_ROOT%\config\profile.d" -) - -pushd "%CMDER_ROOT%\config\profile.d" -for /f "usebackq" %%x in ( `dir /b *.bat *.cmd 2^>nul` ) do ( - REM echo Calling %CMDER_ROOT%\config\profile.d\%%x... - call "%CMDER_ROOT%\config\profile.d\%%x" -) -popd - - if exist "%CMDER_ROOT%\config\user-profile.cmd" ( rem create this file and place your own command in there call "%CMDER_ROOT%\config\user-profile.cmd"