mirror of
https://github.com/cmderdev/cmder.git
synced 2025-06-16 22:57:49 +08:00
Added profile.d like support for all supported shells
This commit is contained in:
14
vendor/init.bat
vendored
14
vendor/init.bat
vendored
@ -88,6 +88,20 @@
|
||||
@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` ) do (
|
||||
REM @echo Calling %CMDER_ROOT%\config\profile.d\%%x...
|
||||
@call %%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"
|
||||
|
Reference in New Issue
Block a user