#!/bin/zsh -f

# shell script name  cdleft:   cd to the directory displayed on the left panel of ForkLift

version="0.0.1"

# Please note that this is not flawless, as it takes awhile for the plist file to update.


###############################################################################
 
#  Created by  on .
#  Copyright (c) . All rights reserved.


#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
#    USA
#    
#    cf. URL:   http://www.fsf.org/licensing/licenses/gpl.html
#
###############################################################################

if [[ -f  $HOME/Library/Preferences/com.binarynights.ForkLift.plist  ]]; then
	cd $( defaults read com.binarynights.ForkLift lastFolderLeftPane )
	pwd
else
	print "This function is designed to work with ForkLift, which does not appear to be installed."
fi


