From eb5ab515739a4a3565beab4708321407a9765ec5 Mon Sep 17 00:00:00 2001 From: Dax Games Date: Sat, 7 Nov 2015 18:12:54 -0600 Subject: [PATCH] Removed training '\' from %CMDER_ROOT% and added config/user-* to .gitignore --- .gitignore | 1 + Cmder.bat | 1 + vendor/init.bat | 8 +++++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 03da90b..0e9e5ec 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ Thumbs.db build/ Version v* *.bak +config/user-* diff --git a/Cmder.bat b/Cmder.bat index 4ae276a..1f31b73 100644 --- a/Cmder.bat +++ b/Cmder.bat @@ -1,3 +1,4 @@ @echo off SET CMDER_ROOT=%~dp0 +if "%CMDER_ROOT:~-1%" == "\" SET CMDER_ROOT=%CMDER_ROOT:~0,-1% start %~dp0/vendor/conemu-maximus5/ConEmu.exe /Icon "%CMDER_ROOT%\icons\cmder.ico" /Title Cmder /LoadCfgFile "%CMDER_ROOT%\config\ConEmu.xml" diff --git a/vendor/init.bat b/vendor/init.bat index 0814411..b25b825 100644 --- a/vendor/init.bat +++ b/vendor/init.bat @@ -9,6 +9,8 @@ for /f "delims=" %%i in ("%ConEmuDir%\..\..") do @set CMDER_ROOT=%%~fi ) +@if "%CMDER_ROOT:~-1%" == "\" SET CMDER_ROOT=%CMDER_ROOT:~0,-1% + :: Change the prompt style :: Mmm tasty lamb @prompt $E[1;32;40m$P$S{git}{hg}$S$_$E[1;30;40m{lamb}$S$E[0m @@ -34,7 +36,7 @@ set "GIT_INSTALL_ROOT=%ProgramFiles%\Git" ) else if exist "%ProgramFiles(x86)%\Git" ( set "GIT_INSTALL_ROOT=%ProgramFiles(x86)%\Git" -) else if exist "%CMDER_ROOT%\vendor" ( +) else if exist "%CMDER_ROOT%\vendor\git-for-windows" ( set "GIT_INSTALL_ROOT=%CMDER_ROOT%\vendor\git-for-windows" ) @@ -46,7 +48,7 @@ ) :: Enhance Path -@set PATH=%CMDER_ROOT%\bin;%PATH%;%CMDER_ROOT% +@set PATH=%CMDER_ROOT%\bin;%PATH%;%CMDER_ROOT%\ :: Add aliases @doskey /macrofile="%CMDER_ROOT%\config\aliases" @@ -57,7 +59,7 @@ @if defined CMDER_START ( @cd /d "%CMDER_START%" ) else ( - @if "%CD%\" == "%CMDER_ROOT%" ( + @if "%CD%\" == "%CMDER_ROOT%\" ( @cd /d "%HOME%" ) )