Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
570729f2
Unverified
Commit
570729f2
authored
May 22, 2020
by
Paul Rudkin
Committed by
GitHub
May 22, 2020
Browse files
forklift: add support for Forklift distributed via the Setapp (#8803)
parent
77b409d5
Changes
1
Show whitespace changes
Inline
Side-by-side
plugins/forklift/forklift.plugin.zsh
View file @
570729f2
# Open folder in ForkLift.app or ForkLift2.app from console
# Open folder in ForkLift.app or ForkLift2.app from console
# Author: Adam Strzelecki nanoant.com, modified by Bodo Tasche bitboxer.de
# 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 2 and ForkLift 3 by Johan Kaving
# Updated to support ForkLift from Setapp by Paul Rudkin
#
#
# Usage:
# Usage:
# fl [<folder>]
# fl [<folder>]
...
@@ -24,6 +25,13 @@ function fl {
...
@@ -24,6 +25,13 @@ function fl {
fi
fi
osascript 2>&1 1>/dev/null
<<
END
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
try
tell application "Finder"
tell application "Finder"
set forkLift3 to name of application file id "com.binarynights.ForkLift-3"
set forkLift3 to name of application file id "com.binarynights.ForkLift-3"
...
@@ -46,7 +54,12 @@ function fl {
...
@@ -46,7 +54,12 @@ function fl {
set forkLift to null
set forkLift to null
end try
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
tell application forkLift3
activate
activate
set forkLiftVersion to version
set forkLiftVersion to version
...
@@ -62,7 +75,9 @@ function fl {
...
@@ -62,7 +75,9 @@ function fl {
set forkLiftVersion to version
set forkLiftVersion to version
end tell
end tell
else
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
set appName to forkLift3
else if forkLift2 is not null then
else if forkLift2 is not null then
set appName to forkLift2
set appName to forkLift2
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment