From 1afdd48f5d2eddbe0e19ad2ed59d4b161fe743ca Mon Sep 17 00:00:00 2001 From: Gregory Anders Date: Thu, 20 Aug 2020 03:21:26 -0600 Subject: 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 --- plugins/fzopen | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'plugins/fzopen') 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 -- cgit v1.2.3-70-g09d2