Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Automatically cd to active Finder directory in new Terminal window' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Automatically cd to active Finder directory in new Terminal window
Authored by: gopes on Sep 24, '11 08:19:35AM

You can also go to Terminal's Preferences > Settings and choose the Shell tab, which gives you an option to run a command when the shell starts, and paste the line in that field. It won't affect anything other than Terminal, which could either be good or badů I'm not sure, but I think adding it to your .bash_profile would change your directory even on remote login, which wouldn't make much sense, since you aren't using the Finder. (I'm probably going to use the command alias method, personally.)



[ Reply to This | # ]
Automatically cd to active Finder directory in new Terminal window
Authored by: Frankus on Oct 07, '11 01:38:27AM
Good point!

I use the following when I don't want code to run if I'm logged in remotely (say, via ssh):

if [ "$TERM_PROGRAM" == "Apple_Terminal" ]; then
  ...
fi


[ Reply to This | # ]