aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile9
-rw-r--r--README.md2
-rw-r--r--register.c4
-rwxr-xr-xvis-copy10
-rwxr-xr-xvis-paste10
5 files changed, 6 insertions, 29 deletions
diff --git a/Makefile b/Makefile
index dab804b..a7d8e02 100644
--- a/Makefile
+++ b/Makefile
@@ -60,10 +60,8 @@ install: vis
@chmod 755 ${DESTDIR}${PREFIX}/bin/vis
@cp -f vis-open ${DESTDIR}${PREFIX}/bin
@chmod 755 ${DESTDIR}${PREFIX}/bin/vis-open
- @cp -f vis-copy ${DESTDIR}${PREFIX}/bin
- @chmod 755 ${DESTDIR}${PREFIX}/bin/vis-copy
- @cp -f vis-paste ${DESTDIR}${PREFIX}/bin
- @chmod 755 ${DESTDIR}${PREFIX}/bin/vis-paste
+ @cp -f vis-clipboard ${DESTDIR}${PREFIX}/bin
+ @chmod 755 ${DESTDIR}${PREFIX}/bin/vis-clipboard
@echo installing support files to ${DESTDIR}${SHAREPREFIX}/vis
@mkdir -p ${DESTDIR}${SHAREPREFIX}/vis
@cp -r visrc.lua lexers ${DESTDIR}${SHAREPREFIX}/vis
@@ -76,8 +74,7 @@ uninstall:
@echo removing executable file from ${DESTDIR}${PREFIX}/bin
@rm -f ${DESTDIR}${PREFIX}/bin/vis
@rm -f ${DESTDIR}${PREFIX}/bin/vis-open
- @rm -f ${DESTDIR}${PREFIX}/bin/vis-copy
- @rm -f ${DESTDIR}${PREFIX}/bin/vis-paste
+ @rm -f ${DESTDIR}${PREFIX}/bin/vis-clipboard
@echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
@rm -f ${DESTDIR}${MANPREFIX}/man1/vis.1
@echo removing support files from ${DESTDIR}${SHAREPREFIX}/vis
diff --git a/README.md b/README.md
index 9fb3e00..9773a6a 100644
--- a/README.md
+++ b/README.md
@@ -234,7 +234,7 @@ Operators can be forced to work line wise by specifying `V`.
"a-"z general purpose registers
"A-"Z append to corresponding general purpose register
- "*, "+ system clipboard integration via shell scripts vis-{copy,paste}
+ "*, "+ system clipboard integration via shell script vis-clipboard
"0 yank register
"/ search register
": command register
diff --git a/register.c b/register.c
index db87275..a36d64e 100644
--- a/register.c
+++ b/register.c
@@ -47,7 +47,7 @@ const char *register_get(Vis *vis, Register *reg, size_t *len) {
int status = vis_pipe(vis, &clipboard,
&(Filerange){ .start = 0, .end = 0 },
- (const char*[]){ "vis-paste", "vis-paste", NULL },
+ (const char*[]){ "vis-clipboard", "vis-clipboard", "--paste", NULL },
read_stdout, read_stderr);
if (status != 0)
vis_info_show(vis, "Command failed %s", stderr.len > 0 ? stderr.data : "");
@@ -90,7 +90,7 @@ bool register_put_range(Vis *vis, Register *reg, Text *txt, Filerange *range) {
};
int status = vis_pipe(vis, &clipboard, range,
- (const char*[]){ "vis-copy", "vis-copy", NULL },
+ (const char*[]){ "vis-clipboard", "vis-clipboard", "--copy", NULL },
NULL, read_stderr);
if (status != 0)
diff --git a/vis-copy b/vis-copy
deleted file mode 100755
index d820d79..0000000
--- a/vis-copy
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-if [ ! -z "$DISPLAY" ]; then
- exec xsel -ib
-elif type pbcopy >/dev/null 2>&1; then
- exec pbcopy
-else
- echo "System clipboard not supported" 1>&2
- exit 1
-fi
diff --git a/vis-paste b/vis-paste
deleted file mode 100755
index a934e63..0000000
--- a/vis-paste
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-if [ ! -z "$DISPLAY" ]; then
- exec xsel -ob
-elif type pbpaste >/dev/null 2>&1; then
- exec pbpaste
-else
- echo "System clipboard not supported" 1>&2
- exit 1
-fi