Skip to content

Instantly share code, notes, and snippets.

@Shoozza
Last active May 10, 2017 10:31
Show Gist options
  • Save Shoozza/c6823363061f34bf9e68 to your computer and use it in GitHub Desktop.
Save Shoozza/c6823363061f34bf9e68 to your computer and use it in GitHub Desktop.
Cmder.bat argument execution support
@ECHO OFF
REM Example: Cmder.bat vim hello_world.c
REM will run vim hello_world.c inside Cmder
REM Note Add following line at the end of init.bat (without REM)
REM @if not "%*" == "" %*
SET "CMDER_ROOT=%~dp0"
IF "%ConEmuDir%" == "" SET "ConEmuDir=%CMDER_ROOT%\vendor\conemu-maximus5"
START "" "%ConEmuDir%\ConEmu.exe" /Icon "%CMDER_ROOT%\icons\cmder.ico" /Title Cmder /LoadCfgFile "%CMDER_ROOT%\config\ConEmu.xml" /cmd cmd /k ""%ConEmuDir%\..\init.bat" %*" -new_console:d:%USERPROFILE%
@alexandr-san4ez
Copy link

alexandr-san4ez commented Sep 7, 2016

Thanks!
But not work: Cmder.bat "vim hello_world.c & echo hello"

@AlonBe
Copy link

AlonBe commented May 10, 2017

@alexandr-san4ez, you can create another .bat file which contains the commands you want to run at Cmder
and just call Cmder.bat YOUR_FILE.bat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment