How to open an app in terminal and passing the current working directory?

Alex Coplan picture Alex Coplan · Dec 26, 2011 · Viewed 54k times · Source

I often want to open the entire directory I'm working in by using the mate command, but how do I pass in the working directory itself?

For example, if I'm working in a rails app and I want to open the app folder into the TextMate tree, I would do mate app, but how could I pass in the working directory itself (i.e. open the entire rails app in the tree)?

Answer

JohnRos picture JohnRos · Dec 26, 2011

The command you might be looking for is

pwd