I\'m trying to write a small script to change the current directory to my project directory:
#!/bin/bash
cd /home/tree/projects/java
I save
Note the discussion How do I set the working directory of the parent process?
It contains some hackish answers, e.g.
https://stackoverflow.com/a/2375174/755804 (changing the parent process directory via gdb, don't do this) and https://stackoverflow.com/a/51985735/755804 (the command tailcd
that injects cd dirname to the input stream of the parent process; well, ideally it should be a part of bash rather than a hack)