Martin S writes:
Anyway I don't have a mouse on that system, so I'll have to use Alan
suggestion.
You could use a little shell function like this one. Add it to your
~/.bashrc or somewhere like that.
locatecd()
{
oldIFS=$IFS
IFS=$'\n'
results=( $( locate "$1" ) )
ret=$?
IFS=$oldIFS
if (( ret ))
then
echo "Sorry, '$1' was not found."
return $ret
fi
if (( [EMAIL PROTECTED] > 1 ))
then
echo "More than one file found, using the first one."
fi
cd "$( dirname "[EMAIL PROTECTED]" )"
}
Alex
--
[EMAIL PROTECTED] mailing list