문제

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
도움이 되었습니까?

해결책

Perhaps this

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

ref

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top