mirror of
https://github.com/cmderdev/cmder.git
synced 2024-11-14 07:29:12 +08:00
init.bat: integrate the unix commands at the end of PATH
Some unix commands shadow windows commands and therefor the unix commands should be at the end of the PATH
This commit is contained in:
parent
182629d59a
commit
2ccc06e639
9
vendor/init.bat
vendored
9
vendor/init.bat
vendored
@ -65,18 +65,23 @@ if not defined TERM set TERM=cygwin
|
|||||||
set test_dir=
|
set test_dir=
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
:: our last hope: our own git...
|
:: our last hope: our own git...
|
||||||
:VENDORED_GIT
|
:VENDORED_GIT
|
||||||
@if exist "%CMDER_ROOT%\vendor\git-for-windows" (
|
@if exist "%CMDER_ROOT%\vendor\git-for-windows" (
|
||||||
set "GIT_INSTALL_ROOT=%CMDER_ROOT%\vendor\git-for-windows"
|
set "GIT_INSTALL_ROOT=%CMDER_ROOT%\vendor\git-for-windows"
|
||||||
|
rem add the minimal git commands to the front of the path
|
||||||
|
set "PATH=%GIT_INSTALL_ROOT%\cmd;%PATH%"
|
||||||
) else (
|
) else (
|
||||||
goto :NO_GIT
|
goto :NO_GIT
|
||||||
)
|
)
|
||||||
|
|
||||||
:FOUND_GIT
|
:FOUND_GIT
|
||||||
:: Add git to the path
|
:: Add git to the path
|
||||||
if defined GIT_INSTALL_ROOT (
|
@if defined GIT_INSTALL_ROOT (
|
||||||
set "PATH=%GIT_INSTALL_ROOT%\bin;%GIT_INSTALL_ROOT%\usr\bin;%GIT_INSTALL_ROOT%\usr\share\vim\vim74;%PATH%"
|
rem add the unix commands including bash in GIT\bin at the end to not shadow windows commands like more
|
||||||
|
echo Enhancing PATH with unix commands from git [%GIT_INSTALL_ROOT%]
|
||||||
|
set "PATH=%PATH%;%GIT_INSTALL_ROOT%\bin;%GIT_INSTALL_ROOT%\usr\bin;%GIT_INSTALL_ROOT%\usr\share\vim\vim74"
|
||||||
:: define SVN_SSH so we can use git svn with ssh svn repositories
|
:: define SVN_SSH so we can use git svn with ssh svn repositories
|
||||||
if not defined SVN_SSH set "SVN_SSH=%GIT_INSTALL_ROOT:\=\\%\\bin\\ssh.exe"
|
if not defined SVN_SSH set "SVN_SSH=%GIT_INSTALL_ROOT:\=\\%\\bin\\ssh.exe"
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user