Expand shell variables in workdir param
Closed this issue · 5 comments
- Support shorthandles for the home dir. Currently only an absolute path is supported.
/Users/soulitude/dev
works but~/dev
and$HOME/dev
don't.
Originally posted by @MEGADR01D in #3 (comment)
Since the Command field already expands shell variables, can't the Workdir do a simple cd
before the <path>
?
I thought about it but i'm not sure if it's a good idea to send something before user command. I need to test it first and maybe try to find some info about similar software or other people experience.
I think the only correct way to do that is to expand those variables when i register a shortcut using a shell defined in preferences.
It's pretty straightforward for typical variables, a simple echo
will suffice. However, tilde is a completely different story and i don't want to use any of the known solutions because to be honest each and every one of them is a mess. So i think i'm going to expand ~
manually by calling something like cd ~ && pwd
or maybe just replacing it internally with $HOME
or /Users/$USER
.
@MEGADR01D it's done now. Tilda is always being expanded, because it's fast and secure. Variables, however, i decided to not touch at all, because it will complicate things a lot. But there is an option in "Preferences" tab now to always send a simple cd
command just like you proposed above. This should do!
Great news, @deseven. Cheers!