I'm trying to use the gnome-terminal profiles to cd to a given directory and register some aliases just after the terminal opens.
I have created a script:
#!/bin/bash alias up='docker-compose up -d' alias down='docker-compose stop' ...
Then a new gnome-terminal Project 1 profile running the following as "custom command"
bash -c "cd ~/Document/project1;. ./ops-setup.sh"
I can see my script launched when I open the terminal with this profile, the terminal remains opened but it does not leave the prompt.
The child process exited normally with status 0.
I tried to add a bash run after it so the prompt remains
bash -c "cd ~/Document/project1;. ./ops-setup.sh";bash
but no alias registered (I guess that's because it is a new process)
I also tried
bash --init-file <(echo "cd ~/Document/project1;. ./ops-setup.sh")
but bash complains
bash: cd ~/Document/project1;. ./ops-setup.sh): No such file or directory
How can I keep my aliases registered for this Project 1 profile ?
There are multiple ways to keep the terminal opened after running scripts and I that's not my issue. I'm really talking about keeping aliases registered