I've created an alias in .bashrc
file as follows
alias myproject = 'cd ~/Desktop/myproject'
After saving the file when I restart my terminal, typing in myproject
takes me to the project directory but when I try to use the alias as a command argument to a new gnome-terminal
tab it throws an error,
gnome-terminal --tab -e "myproject"
throws the error
There was an error creating the child process for this terminal
Failed to execute child process "myproject" (No such file or directory)
What is wrong with this ?
When a bash shell is started, per default bash
executes the commands specified in .bashrc
. This is how your shell knows your alias
es.
Now your idea does not work because gnome-terminal
never sees your .bashrc
file.
You could try
gnome-terminal --working-directory='<path-to-your-home-directory>/Desktop/myproject/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With