Skip to content

Commit

Permalink
forklift: add support for Forklift distributed via the Setapp (ohmyzs…
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgit authored and shlomif committed May 26, 2020
1 parent a2bbf83 commit 7554937
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions plugins/forklift/forklift.plugin.zsh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Open folder in ForkLift.app or ForkLift2.app from console
# Author: Adam Strzelecki nanoant.com, modified by Bodo Tasche bitboxer.de
# Updated to support ForkLift 2 and ForkLift 3 by Johan Kaving
# Updated to support ForkLift from Setapp by Paul Rudkin
#
# Usage:
# fl [<folder>]
Expand All @@ -24,6 +25,13 @@ function fl {
fi
osascript 2>&1 1>/dev/null <<END
try
tell application "Finder"
set forkLiftSetapp to name of application file id "com.binarynights.forklift-setapp"
end tell
on error err_msg number err_num
set forkLiftSetapp to null
end try
try
tell application "Finder"
set forkLift3 to name of application file id "com.binarynights.ForkLift-3"
Expand All @@ -46,7 +54,12 @@ function fl {
set forkLift to null
end try
if forkLift3 is not null and application forkLift3 is running then
if forkLiftSetapp is not null and application forkLiftSetapp is running then
tell application forkLiftSetapp
activate
set forkLiftVersion to version
end tell
else if forkLift3 is not null and application forkLift3 is running then
tell application forkLift3
activate
set forkLiftVersion to version
Expand All @@ -62,7 +75,9 @@ function fl {
set forkLiftVersion to version
end tell
else
if forkLift3 is not null then
if forkLiftSetapp is not null then
set appName to forkLiftSetapp
else if forkLift3 is not null then
set appName to forkLift3
else if forkLift2 is not null then
set appName to forkLift2
Expand Down

0 comments on commit 7554937

Please sign in to comment.