kfish / xsel

A command-line program for getting and setting the contents of the X selection
http://www.kfish.org/software/xsel/
Other
336 stars 37 forks source link

Option: trim trailing newline from output #39

Closed aaaaaaaalex closed 2 years ago

aaaaaaaalex commented 3 years ago

Hey, I added something I thought might be a useful addition :smiley:

Very simple option that nullifies trailing newline chars when output would otherwise end in one. I personally have a use-case for this, and it seems a few other people do too as there are a few SO questions relating to it. xclip has a similar option to this (-r).

Please request any changes you feel are necessary, or close this if I've missed something horribly obvious that would render this PR useless :rofl:

Best regards

lmburns commented 2 years ago

I'd like for this to be a feature as well