I have started from this question: How to run bash commands and leave prompt open?
Git-Bash are quite different.
Git-Bash is a wrapper that behaves differently.
I have a shortcut that starts this
Git-Bash shell. After starting it, I want it to
source start.sh automatically, and then to leave the shell open.
Whatever I have tried so far did not work.
This is my
# The File-Editor.
alias n='"C:\\Program Files\\Notepad++\\notepad++.exe"'
# The Build Commands.
# The 'Docker' Commands.
alias dd='docker-compose down -v'
alias db='docker-compose build'
alias du='docker-compose up'
Thanks everyone for commenting.
This is an example of one of my attempts to solve this problem:
The shortcut starts the following one-liner:
/c/Progra~1/Git/git-bash.exe -c 'exec /c/Progra~1/Git/git-bash.exe --cd=/c/DGSante/Git/dg-sante-new-cpms/ --init-file /c/DGSante/Git/dg-sante-new-cpms/start.sh -i'
However, although the first
Git-Bash interactively starts the second
Git-Bash in the necessary working folder and uses the
start.sh as an
init-file, the secondary
Git-Bash is terminated and it does not remain open.
Great thanks to @muru for clarifications.
The working solution looks like the following one-liner:
"C:\Program Files\Git\bin\bash.exe" --cd=C:\DGSante\Git\dg-sante-new-cpms\ --init-file C:\DGSante\Git\dg-sante-new-cpms\start.sh
I have removed the usage of the
Git-Bash wrapper. I am relying entirely on the
Bash port to the
I absolutely agree to @Marcus Müller's comments. However, this is the only place where I have found help.