summaryrefslogtreecommitdiffstats
path: root/src/scripts/lnav-copy-text.lnav
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-07 04:48:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-07 04:48:35 +0000
commit207df6fc406e81bfeebdff7f404bd242ff3f099f (patch)
treea1a796b056909dd0a04ffec163db9363a8757808 /src/scripts/lnav-copy-text.lnav
parentReleasing progress-linux version 0.11.2-1~progress7.99u1. (diff)
downloadlnav-207df6fc406e81bfeebdff7f404bd242ff3f099f.tar.xz
lnav-207df6fc406e81bfeebdff7f404bd242ff3f099f.zip
Merging upstream version 0.12.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/scripts/lnav-copy-text.lnav15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/scripts/lnav-copy-text.lnav b/src/scripts/lnav-copy-text.lnav
new file mode 100644
index 0000000..541409e
--- /dev/null
+++ b/src/scripts/lnav-copy-text.lnav
@@ -0,0 +1,15 @@
+#
+# @synopsis: lnav-copy-text
+# @description: Copy text from the top view
+#
+
+;SELECT jget(selected_text, '/value') AS content FROM lnav_top_view
+;SELECT CASE
+ WHEN $content IS NULL THEN
+ ':write-to -'
+ ELSE
+ ':echo -n ${content}'
+ END AS cmd
+
+:redirect-to /dev/clipboard
+:eval ${cmd}