Open git bash shell window, execute command and remain after term signal -


i have batch file sets environment opening number of "git bash" shell windows. works apart 1 annoying feature if press ctrl c (or send other term signal) whole bash window close.

i want window behave if has been opened , when receives term signal goes bash prompt.

here current contents of setup.bat file:

c: cd \project\ start "" "%systemdrive%\program files (x86)\git\bin\sh.exe" --login -i -l -c "source ali.sh && mvn spring-boot:run" cd \project2\ start "" "%systemdrive%\program files (x86)\git\bin\sh.exe" --login 

note first start command runs maven , when want restart command (press ctrl+c) closes whole window. second start command creates new bash window in directory works normal bash window ctrl+c, want have run command @ start.

is possible? many help

something might work you:

c: cd \project\ start "" "%systemdrive%\program files (x86)\git\bin\sh.exe" --login -i -l -c "sh -c 'source ali.sh && mvn spring-boot:run; exec sh'" 

the trick wrapping command in:

sh -c '...; exec sh' 

where sh shell, might bash.

you might able suffix each command with: exec sh, eg:

start "" "%systemdrive%\program files (x86)\git\bin\sh.exe" --login -i -l -c "source ali.sh && mvn spring-boot:run; exec sh" 

Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -