diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2020-05-29 11:01:03 -0600 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2020-05-29 11:01:03 -0600 |
commit | a3be2e4084285d7625e63bfe4b951c58143e3c9c (patch) | |
tree | a018be4daef44a51b91477f38da514867659c7d6 /plugins/forklift | |
parent | 191e14cc7f63c4525a0f66d571416faf9e91a185 (diff) | |
parent | 93cc3964e2d265ab0571298d69d2eed0a65d13f2 (diff) | |
download | zsh-a3be2e4084285d7625e63bfe4b951c58143e3c9c.tar.gz zsh-a3be2e4084285d7625e63bfe4b951c58143e3c9c.tar.bz2 zsh-a3be2e4084285d7625e63bfe4b951c58143e3c9c.zip |
Merge branch 'master' of https://github.com/ohmyzsh/ohmyzsh
Diffstat (limited to 'plugins/forklift')
-rw-r--r-- | plugins/forklift/forklift.plugin.zsh | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/plugins/forklift/forklift.plugin.zsh b/plugins/forklift/forklift.plugin.zsh index 274c4a822..85889481b 100644 --- a/plugins/forklift/forklift.plugin.zsh +++ b/plugins/forklift/forklift.plugin.zsh @@ -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>] @@ -26,6 +27,13 @@ function fl { 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" end tell on error err_msg number err_num @@ -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 @@ -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 |