Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ConEmu commands in task

I'm trying to get a Task in ConEmu to open several consoles, and for each run a batch-like script when opened. For example:

  • Open a Git Bash, name the console "X", set the current directory to "Y".
  • Open another Git Bash and run a set of commands, for example "cd A/B/C", "vagrant up"
  • Open a regular command window, run the command "cd D/E/F", "grunt watch"

I want the second and third consoles to appear alongside each other, but underneath the first console. So far I am stuck getting commands to run; I have a task that runs the following:

"%ProgramFiles(x86)%\Git\bin\sh.exe" --login -i "-cur_console:n:t:Git Bash" "-cur_console:d:C:\Users\Ole Vik\dev"
"%ProgramFiles(x86)%\Git\bin\sh.exe" --login -i "-cur_console:s1TVn:t:Vagrant"
cmd "-cur_console:s2THn:t:Third"

Reading the ConEmu wiki led me to the new_console and cur_console switches, but I'm having trouble figuring out if I can somehow enter commands in the Task setup, or maybe if I can have it run a .bat script on each console.

like image 420
OleVik Avatar asked Feb 15 '14 19:02

OleVik


People also ask

What is Cmder ConEmu?

The “ConEmu” and “Cmder” is console software for developer or coder to execute commands. The “ConEmu” is free software for console users to execute WinAPI as well as Unix PTY commands. The “Cmder” is a software package for console users to execute PowerShell, CMD, Git commands easily.


1 Answers

No colon is needed between switches (n & t for example).

cmd has /k switch to run commands.

I don't know the way to tell bash "run this command and stay in prompt". May be you need to run commands with &. I'm not sure about second line, you need to check it yourself.

"%ProgramFiles(x86)%\Git\bin\sh.exe" --login -i "-cur_console:nt:Git Bash" "-cur_console:d:C:\Users\Ole Vik\dev"
cmd -cur_console:s1TVnt:Vagrant /c vagrant up & "%ProgramFiles(x86)%\Git\bin\sh.exe" --login -i"
cmd -cur_console:s2THnt:Third /k cd /d "D\E\F" & grunt watch
like image 138
Maximus Avatar answered Sep 18 '22 11:09

Maximus