Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Transitioning from Windows to the Mac. In Windows, I had a lot of environmental variables set-up that I used to speed up my work. Thinks like

DEVDIR=C:\WORKDOCS\DOCS_jaravj\PROJ\dev
DOCDIR=C:\WORKDOCS\DOCS_jaravj
PERS=C:\WORKDOCS\DOCS_jaravj\Personal
PROD=C:\WORKDOCS\DOCS_jaravj\PROJ\PROD
SVN=C:\WORKDOCS\DOCS_jaravj\PROJ\SVN_CO_Tort

etc...

That, and the "magic" of autocompletion in the "Run" box and in the file save/open dialogs, allowed me to move around very quickly.

I've set up the equivalent env. variables in the shell, and I can cd and mv etc to the proper directories, but I haven't found a way to do something similar for the GUI apps, so that I can use the same shortcuts in the applications...

I've followed the tips in http://stackoverflow.com/questions/135688/setting-environment-variables-in-os-x to add the env vars to /etc/launchd.conf but when I am going to save a file (for example), I can't use $PROJ in the "directory selector" and have the file be saved there...

share|improve this question
1  
How would you use a GUI app to call an environment variable? Can you edit in a specific instance how this might work? –  bmike Jul 10 '13 at 19:13
1  
@bmike this is standard OS interaction call the function getenv() passing the name and it returns the value –  Mark Jul 10 '13 at 19:17
    
@Mark so this really isn't a user level question since you need to be developing an app to make the call? I'm assuming GUI means cocoa…. –  bmike Jul 10 '13 at 20:44
    
I'll try and take a few screenshots to show what I mean but at the moment I'm a all tied up, so it might take a bit. Basically, to "see" what I mean, define a couple of user env. variables in Windows and then type them in the location bar in Explorer, or in a "save" dialog box - you can do things such as %DOCDIR% <TAB> and it'll auto-complete and suggest alternates from there... Extremely powerful, mouseless way of navigating the system –  JJarava Jul 11 '13 at 20:54
add comment

1 Answer

I don't believe variables set in the environment are going to work in the Open & Save dialog box (OSDB). It's a nice idea, but you'd have to admit, kinda neckbeardy.

The Macintosh way would be to use the Favorites list presented on the left of the OSDB. Drag your often used directories there and you have one-click access.

A much more powerful alternative is Default Folder X. This gives you an incredible degree of short-cutting and changes of default behaviors in the OSDB.

share|improve this answer
    
If you test it in Windows, you'll see that you can type in env. vars in any "explorer" dialog, and it'll auto-expand and auto-complete. It's kind of nerdy, but allows you to do all kinds of file management from the command line. Thanks for the tip about DefaultFolder X; other things I miss from OSX are being able to do "file actions" (like open a new folder, delete o rename files) from within the open/save/file dialogues. –  JJarava Jul 11 '13 at 20:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.