aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/fzopen
diff options
context:
space:
mode:
authorGravatar Gregory Anders <github@gpanders.com>2020-08-20 03:21:26 -0600
committerGravatar GitHub <noreply@github.com>2020-08-20 14:51:26 +0530
commit1afdd48f5d2eddbe0e19ad2ed59d4b161fe743ca (patch)
tree4be450c2344224527c31eff9a8fc3ad2b456059b /plugins/fzopen
parentd78856626844bc14a09c271703f3a825ec1e8671 (diff)
downloadnnn-1afdd48f5d2eddbe0e19ad2ed59d4b161fe743ca.tar.gz
nuke: use macOS open when GUI enabled (#705)
* nuke: use macOS open when GUI enabled * nuke: use is_mac function to test for macOS This is consistent with how the imgur plugin does detection. * Add macOS open command to plugins * pskill: only execute if input is non-empty
Diffstat (limited to 'plugins/fzopen')
-rwxr-xr-xplugins/fzopen7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/fzopen b/plugins/fzopen
index 677ea26..fa44e0f 100755
--- a/plugins/fzopen
+++ b/plugins/fzopen
@@ -29,5 +29,10 @@ case "$(file -biL "$entry")" in
*text*)
"${VISUAL:-$EDITOR}" "$entry" ;;
*)
- xdg-open "$entry" >/dev/null 2>&1 ;;
+ if uname | grep -q "Darwin"; then
+ open "$entry" >/dev/null 2>&1
+ else
+ xdg-open "$entry" >/dev/null 2>&1
+ fi
+ ;;
esac