Skip to content

Commit

Permalink
Process profile.d scripts before adding user aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
Dax T. Games committed Mar 7, 2016
1 parent 06c6e5f commit 01667a5
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions vendor/init.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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" (
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 01667a5

Please # to comment.