You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lnav/src/scripts/lnav-copy-text.lnav

16 lines
307 B
Plaintext

#
# @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}