aboutsummaryrefslogtreecommitdiff
path: root/vis-clipboard
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-12-01 12:32:00 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-12-01 12:32:00 +0100
commit78551eabf7e129ba7238739c3aea952c49b35eb5 (patch)
tree8f2e0ef6f8f6eb7dc0690a85c130db83cf498a20 /vis-clipboard
parent97694a796c9d54ea6647b12e7aafb41ac5546435 (diff)
downloadvis-78551eabf7e129ba7238739c3aea952c49b35eb5.tar.gz
vis-78551eabf7e129ba7238739c3aea952c49b35eb5.tar.xz
vis-clipboard: fix detection of macOS systems
macOS might also have $DISPLAY defined but neither of xclip nor xsel available. Keep trying different methods until we succeeded or ran out of options. Fix #417
Diffstat (limited to 'vis-clipboard')
-rwxr-xr-xvis-clipboard8
1 files changed, 6 insertions, 2 deletions
diff --git a/vis-clipboard b/vis-clipboard
index 3a51b12..0ceed70 100755
--- a/vis-clipboard
+++ b/vis-clipboard
@@ -19,10 +19,14 @@ vc_determine_command() {
return 0
fi
done
- elif type pbcopy >/dev/null 2>&1; then
+ fi
+
+ if type pbcopy >/dev/null 2>&1; then
echo 'mac'
return 0
- elif [ -c /dev/clipboard ]; then
+ fi
+
+ if [ -c /dev/clipboard ]; then
echo 'cygwin'
return 0
fi