Skip to content

Commit

Permalink
Merge pull request #2742 from daxgames/better_bat
Browse files Browse the repository at this point in the history
Better bat
  • Loading branch information
daxgames authored Sep 4, 2022
2 parents 4846eff + 61e7028 commit ef0de62
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ Version v*
.github_changelog_generator
launcher/.vs
launcher/src/version.rc2
.vs/*
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Change Log

## [Unreleased](https://ci.appveyor.com/project/MartiUK/cmder/build/artifacts) (2022-03-17)
## [1.3.20-unreleased](https://ci.appveyor.com/project/MartiUK/cmder/build/artifacts) (2022-03-17)

### Changes

Expand All @@ -9,6 +9,7 @@

### Fixes

- Fix #2740
- Fix find and use latest Git install always using vendored Git.
- Fix using Git from vendored Git and other Git for Windows tools from other Git in path.
- Remove setting `term=cygwin` in `init.bat` to fix random `ABCD` characters when using arrow keys in `vim`.
Expand Down
6 changes: 5 additions & 1 deletion Cmder.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ SET CMDER_ROOT=%~dp0
:: Remove Trailing '\'
@if "%CMDER_ROOT:~-1%" == "\" SET CMDER_ROOT=%CMDER_ROOT:~0,-1%

if not exist "%CMDER_ROOT%\config\user_ConEmu.xml" (
copy "%CMDER_ROOT%\vendor\ConEmu.xml.default" "%CMDER_ROOT%\config\user_ConEmu.xml"
)

if exist "%~1" (
start %~dp0/vendor/conemu-maximus5/ConEmu.exe /Icon "%CMDER_ROOT%\icons\cmder.ico" /Title Cmder /LoadCfgFile "%~1"
) else (
start %~dp0/vendor/conemu-maximus5/ConEmu.exe /Icon "%CMDER_ROOT%\icons\cmder.ico" /Title Cmder /LoadCfgFile "%CMDER_ROOT%\config\ConEmu.xml"
start %~dp0/vendor/conemu-maximus5/ConEmu.exe /Icon "%CMDER_ROOT%\icons\cmder.ico" /Title Cmder /LoadCfgFile "%CMDER_ROOT%\config\user_ConEmu.xml"
)
10 changes: 5 additions & 5 deletions vendor/lib/lib_path.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ exit /b
exit /b

:toolong
echo "%OLD_PATH%">tempfileA
echo "%PATH%">tempfileB
fc /b tempfileA tempfileB 2>nul 1>nul
if errorlevel 1 ( del tempfileA & del tempfileB & goto :changed )
del tempfileA & del tempfileB
echo "%OLD_PATH%">"%temp%\cmder_lib_pathA"
echo "%PATH%">"%temp%\cmder_lib_pathB"
fc /b "%temp%\cmder_lib_pathA" "%temp%\cmder_lib_pathB" 2>nul 1>nul
if errorlevel 1 ( del "%temp%\cmder_lib_pathA" & del "%temp%\cmder_lib_pathB" & goto :changed )
del "%temp%\cmder_lib_pathA" & del "%temp%\cmder_lib_pathB"
exit /b

:changed
Expand Down

0 comments on commit ef0de62

Please sign in to comment.