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:
Jan Schulz 2016-03-02 17:51:15 +01:00
parent 182629d59a
commit 2ccc06e639

9
vendor/init.bat vendored
View File

@ -65,18 +65,23 @@ if not defined TERM set TERM=cygwin
set test_dir=
)
)
:: our last hope: our own git...
:VENDORED_GIT
@if exist "%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 (
goto :NO_GIT
)
:FOUND_GIT
:: Add git to the path
if defined GIT_INSTALL_ROOT (
set "PATH=%GIT_INSTALL_ROOT%\bin;%GIT_INSTALL_ROOT%\usr\bin;%GIT_INSTALL_ROOT%\usr\share\vim\vim74;%PATH%"
@if defined GIT_INSTALL_ROOT (
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
if not defined SVN_SSH set "SVN_SSH=%GIT_INSTALL_ROOT:\=\\%\\bin\\ssh.exe"
)