I use a lot of aliases in my ~/.bash_profile.. just to make my navigation easier and so on.

I was wondering if I can make environment variables recognizable by OSX at a gui level.. for example if I open a finder window, and click g, I'd like to enter something like this enter image description here

where $dev is defined as /path/to/my/dev/folder


1 Answer 1


It's technically possible, but messy in recent versions of macOS -- see this stackoverflow question for details. But it won't do what you want, because the environment variable substitutions you're used to are done by the shell; most GUI inputs (like the Finder's Go To Folder command) are not parsed by a shell, so no environment variable substitution is performed. The Go To Folder operation in your screenshot isn't looking for a variable named "dev", it's looking for a folder literally named "$dev".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .