vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit 831785b9026f88774b0ca232d1394f97c8118e8e
parent fcd45f47fe5c58e3dd081f4487fc0ff540f9ce09
Author: Randy Palamar <palamar@ualberta.ca>
Date:   Thu, 25 May 2023 16:49:47 -0600

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

Diffstat:
Mman/vis-clipboard.1 | 3++-
Mvis-clipboard | 4----
2 files changed, 2 insertions(+), 5 deletions(-)

diff --git 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 @@ -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