clipmenu

Simple clipboard management using dmenu
git clone https://git.sinitax.com/cdown/clipmenu
Log | Files | Refs | README | LICENSE | sfeed.txt

commit d4390324f535faae2db6316facfd051d53646d21
parent d246b63f2700e26809e6b8d5e07834e298fcc0e9
Author: Chris Down <chris@chrisdown.name>
Date:   Mon, 27 Jul 2015 20:19:41 -0700

Document why we add/remove an "x" when grabbing the clipboard data

Diffstat:
Mclipmenud | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/clipmenud b/clipmenud @@ -13,6 +13,9 @@ while sleep 1; do data=$(xclip -o -sel "$selection"; printf x) fi + # We add and remove the x so that trailing newlines are not stripped. + # Otherwise, they would be stripped by the very nature of how POSIX + # defines command substitution. data=${data%x} [[ $data == *[^[:blank:]]* ]] || continue