From f64a644294f268f8386c61faec6242b9ca0787f8 Mon Sep 17 00:00:00 2001 From: Randy Palamar Date: Thu, 25 May 2023 16:49:47 -0600 Subject: vis-clipboard: don't fail when sel is primary on unsupported platforms this is mostly useful for the internal vis usage and makes both `*` and `+` registers work on macOS/cygwin. fixes: #1067 --- man/vis-clipboard.1 | 3 ++- vis-clipboard | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/man/vis-clipboard.1 b/man/vis-clipboard.1 index 8ed454c..7bd734b 100644 --- a/man/vis-clipboard.1 +++ b/man/vis-clipboard.1 @@ -53,7 +53,8 @@ In this mode, reads the content of the system clipboard, and writes it to standard output. .It Fl -selection Ar selection -specify which selection to use, options are "primary" or "clipboard" +specify which selection to use, options are "primary" or +"clipboard". Silently ignored on platforms with a single clipboard. .El . .Sh ENVIRONMENT diff --git a/vis-clipboard b/vis-clipboard index bb993e7..fd9cf7b 100755 --- a/vis-clipboard +++ b/vis-clipboard @@ -37,10 +37,6 @@ vc_determine_command() { done fi - if [ "$sel" = "primary" ]; then - vc_fatal "clipboard primary selection is not supported on your platform" - fi - if command -v pbcopy >/dev/null 2>&1; then echo 'mac' return 0 -- cgit v1.2.3