2

Is there a quick command that I can put in so that if I run this tool it will open a shell which is set to the repo's directory? I have searched everywhere and it seems I cannot find a command that will work!

enter image description here

Answer

I finally found out how to do it:

cmd /c cd %v & start "" "C:\path\to\bin\sh.exe" --login -i

The reason why you have to pass an empty argument to the start command is because the first argument in quotes gets set as the window title. So, if you want to name your window, do this:

cmd /c cd %v & start "WINDOW TITLE HERE" "C:\path\to\bin\sh.exe" --login -i

Command explanation

  • cmd /c cd %v - Changes your current directory to the path of the repo.
  • start "WINDOW TITLE HERE" "C:\path\to\bin\sh.exe" --login -i - Starts up your shell, setting the window to WINDOW TITLE HERE, and passing --login -i to the executable sh.exe

1 Answer 1

1

Perhaps this

cmd /c cd %v & start C:/path/to/bin/bash -il

ref

Sign up to request clarification or add additional context in comments.

1 Comment

So, after your answer, it led me to a very similar command: cmd /c cd %v & start "" "C:\path\to\bin\sh.exe" --login -i Thank you!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.