For Apple's Terminal.app |
For iTerm.app |
A further powerful use of
posd is in conjunction with a posd.term file that one can create by
saving an open terminal session after setting all defaults to the
prefered state, by changing the lines in the new posd.term
<key>ExecutionString</key>
<string></string> to the following for a tcsh terminal session: <key>ExecutionString</key>
<string>cd "`posd`"; pwd </string> or to the following for a zsh or bash session: <key>ExecutionString</key>
<string>cd "$(posd)";pwd</string> and the resulting file is a clickable icon that can be placed in the finder tool bar. Clicking opens a new terminal window corresponding to the finder. Gary has included Applescript versions of this tool bar utility having greater functionality for both Terminal.app and iTerm.app, and these are placed in /sw/share/pos when you use the fink installation script. |
You can download
my iTerm customization Applescripts here. This enables you to
open a NEW tab in a current terminal (if one is available,
otherwise it starts one) that cd's into the directory shown in the
finder. Gary also distributes an iTerm Applescript that is a little more involved and changes the directory of the current frontmost iTerm session (equivalent to typing cdf). |