]>
git.rmz.io Git - dotfiles.git/blob - zsh/plugins/forklift/forklift.plugin.zsh
1 # Open folder in ForkLift.app from console
2 # Author: Adam Strzelecki nanoant.com, modified by Bodo Tasche bitboxer.de
7 # Opens specified directory or current working directory in ForkLift.app
10 # It assumes Shift+Cmd+G launches go to folder panel and Cmd+N opens new
13 # https://gist.github.com/3313481
15 if [ ! -z "$1" ]; then
17 if [ ! -d "$DIR" ]; then
20 if [ "$DIR" != "." ]; then
24 osascript
2>&1 1>/dev
/null
<<END
25 tell application "ForkLift"
28 tell application "System Events"
29 tell application process "ForkLift"
31 set topWindow to window 1
33 keystroke "n" using command down
34 set topWindow to window 1
36 keystroke "g" using {command down, shift down}
37 tell sheet 1 of topWindow
38 set value of text field 1 to "$PWD"