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


Click here to return to the 'Make the synchronization automatic' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Make the synchronization automatic
Authored by: mithras on Apr 14, '05 10:19:12AM

Adding to my own hint here :)

To make this synchronization automatic -- so that every cd in the terminal drawer is reflected in the Path Finder window, and every change in the window is reflected in the terminal -- you can add the below to a .bashrc:

Caveats:
  1. The PROMPT_COMMAND, which synchronizes the terminal to the window, is slow. I don't mind because I use the terminal drawer sparingly, but if it bothers you, you can drop it.
  2. This works better in list and icon views than column, because column view steals the focus from the terminal every time you cd in terminal.
function mycd()
{
	if [ ! -z "$LAUNCHING_APP" ]; then
		if [ "$LAUNCHING_APP" = "Path Finder" ]; then
			pft
			export DONT_RUN_PFF="true"
		fi
	fi
}

alias cd="mycd" 

if [ ! -z "$LAUNCHING_APP" ]; then
if [ "$LAUNCHING_APP" = "Path Finder" ]; then
export PROMPT_COMMAND="if [ -z $DONT_RUN_PFF ]; then pff; fi; unset DONT_RUN_PFF"
fi
fi

---
--
Listen To My iTunes Library (6500+ songs, iTunes 4 required)

[ Reply to This | # ]