I am writing a bash script to loop through multiple repositories and open a tab for each one inside of a single ConEmu window.

/c/Users/me/Desktop/ConEmu\ Container/ConEmu64.exe -reuse -run "C:\Users\me\AppData\Local\Programs\Git\bin\bash.exe" -new_console:t:$DIRECTORY -new_console:d:"${winPath}" &

Now this line of code works, it creates the correct tabs, but I want to add onto this command so it runs "git pull" in that particular tab when it opens. I want this so I can look through the status of all my repos. I have tried reading documentation, but I cannot seem to convey my goal in search-engine friendly words.

Can anyone help me add a git command to this code?

  • Do you need opened shell in tabs or not?
    – Maximus
    Jun 3 '19 at 19:01

Problem solved; the following does a few commands on tab start-up and then becomes interactive. Cheers!

/c/Users/me/Desktop/ConEmu\ Container/ConEmu64.exe -reuse -run "C:\Users\me\AppData\Local\Programs\Git\bin\bash.exe --login -c ls && pwd && 'git pull' && bash --login -i" -new_console:t:$DIRECTORY -new_console:d:"${winPath}" &

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.