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/imgview | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'plugins/imgview') diff --git a/plugins/imgview b/plugins/imgview index 4bbff2d..16d483b 100755 --- a/plugins/imgview +++ b/plugins/imgview @@ -39,7 +39,11 @@ if [ -z "$1" ] || ! [ -s "$1" ]; then exit 1 fi -if command -v imvr >/dev/null 2>&1; then +if uname | grep -q "Darwin"; then + if [ -f "$1" ]; then + open "$1" >/dev/null 2>&1 & + fi +elif command -v imvr >/dev/null 2>&1; then if [ -f "$1" ]; then view_dir imvr "$1" >/dev/null 2>&1 & elif [ -d "$1" ] || [ -h "$1" ]; then -- cgit v1.2.3-70-g09d2