mirror of
https://github.com/cmderdev/cmder.git
synced 2024-11-10 17:59:11 +08:00
replace user-aliases with user_aliases
This commit is contained in:
parent
08e1244fe5
commit
d91438de47
30
vendor/init.bat
vendored
30
vendor/init.bat
vendored
@ -245,24 +245,24 @@ if not defined user-aliases (
|
|||||||
:: The aliases environment variable is used by alias.bat to id
|
:: The aliases environment variable is used by alias.bat to id
|
||||||
:: the default file to store new aliases in.
|
:: the default file to store new aliases in.
|
||||||
if not defined aliases (
|
if not defined aliases (
|
||||||
set "aliases=%user-aliases%"
|
set "aliases=%user_aliases%"
|
||||||
)
|
)
|
||||||
|
|
||||||
:: Make sure we have a self-extracting user-aliases.cmd file
|
:: Make sure we have a self-extracting user-aliases.cmd file
|
||||||
setlocal enabledelayedexpansion
|
setlocal enabledelayedexpansion
|
||||||
if not exist "%user-aliases%" (
|
if not exist "%user_aliases%" (
|
||||||
echo Creating initial user-aliases store in "%user-aliases%"...
|
echo Creating initial user-aliases store in "%user_aliases%"...
|
||||||
copy "%CMDER_ROOT%\vendor\user-aliases.cmd.example" "%user-aliases%"
|
copy "%CMDER_ROOT%\vendor\user-aliases.cmd.example" "%user_aliases%"
|
||||||
) else (
|
) else (
|
||||||
type "%user-aliases%" | findstr /i ";= Add aliases below here" >nul
|
type "%user_aliases%" | findstr /i ";= Add aliases below here" >nul
|
||||||
if "!errorlevel!" == "1" (
|
if "!errorlevel!" == "1" (
|
||||||
echo Creating initial user-aliases store in "%user-aliases%"...
|
echo Creating initial user-aliases store in "%user_aliases%"...
|
||||||
if defined CMDER_USER_CONFIG (
|
if defined CMDER_USER_CONFIG (
|
||||||
copy "%user-aliases%" "%user-aliases%.old_format"
|
copy "%user_aliases%" "%user_aliases%.old_format"
|
||||||
copy "%CMDER_ROOT%\vendor\user-aliases.cmd.example" "%user-aliases%"
|
copy "%CMDER_ROOT%\vendor\user-aliases.cmd.example" "%user_aliases%"
|
||||||
) else (
|
) else (
|
||||||
copy "%user-aliases%" "%user-aliases%.old_format"
|
copy "%user_aliases%" "%user_aliases%.old_format"
|
||||||
copy "%CMDER_ROOT%\vendor\user-aliases.cmd.example" "%user-aliases%"
|
copy "%CMDER_ROOT%\vendor\user-aliases.cmd.example" "%user_aliases%"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -270,15 +270,15 @@ if not exist "%user-aliases%" (
|
|||||||
:: Update old 'user-aliases' to new self executing 'user-aliases.cmd'
|
:: Update old 'user-aliases' to new self executing 'user-aliases.cmd'
|
||||||
if exist "%CMDER_ROOT%\config\aliases" (
|
if exist "%CMDER_ROOT%\config\aliases" (
|
||||||
echo Updating old "%CMDER_ROOT%\config\aliases" to new format...
|
echo Updating old "%CMDER_ROOT%\config\aliases" to new format...
|
||||||
type "%CMDER_ROOT%\config\aliases" >> "%user-aliases%" && del "%CMDER_ROOT%\config\aliases"
|
type "%CMDER_ROOT%\config\aliases" >> "%user_aliases%" && del "%CMDER_ROOT%\config\aliases"
|
||||||
) else if exist "%user-aliases%.old_format" (
|
) else if exist "%user_aliases%.old_format" (
|
||||||
echo Updating old "%user-aliases%" to new format...
|
echo Updating old "%user_aliases%" to new format...
|
||||||
type "%user-aliases%.old_format" >> "%user-aliases%" && del "%user-aliases%.old_format"
|
type "%user_aliases%.old_format" >> "%user_aliases%" && del "%user_aliases%.old_format"
|
||||||
)
|
)
|
||||||
endlocal
|
endlocal
|
||||||
|
|
||||||
:: Add aliases to the environment
|
:: Add aliases to the environment
|
||||||
call "%user-aliases%"
|
call "%user_aliases%"
|
||||||
|
|
||||||
:: See vendor\git-for-windows\README.portable for why we do this
|
:: See vendor\git-for-windows\README.portable for why we do this
|
||||||
:: Basically we need to execute this post-install.bat because we are
|
:: Basically we need to execute this post-install.bat because we are
|
||||||
|
Loading…
Reference in New Issue
Block a user