I love using the Preferences->Shortcuts in Haiku. I also use Terminal quite often (all the time.) I like having custom Shortcuts to start Terminal. If this sounds like you, or could be you, then you might find the following interesting.
I found that using Shortcuts to open Terminal is ( now was) limited to winding up in the root directory “/”. Lame. Who wants to always start their Terminal journey there? Not me.
To remedy this, I spent a few hours this weekend playing with Terminal’s source code. I came up with a few lines of code that make it so you can pass a working directory to Terminal.
$ Terminal -w /boot/home/config/
will put your new Terminal in the /boot/home/config directory.
Or you could use:
$ Terminal --working-directory /boot/home/config/
I added the lines in -h/–help to document the feature for users. All that I have left to do is add checking to make sure that a valid directory is passed as the argument and some code cleanup. Then I’ll be submitting the code. As of right now, it will default to the current directory if an invalid directory is passed. This actually might be good enough, or even the preferred result. I haven’t decided.
What does everyone think? Would you use this? Did I waste my time? I don’t think so. I love it!