I'm wondering if there is a command line clipboard manipulation program for Linux like xsel or xclip that supports RTF formatted data? What I mean is, if I use xsel to put RTF data on the clipboard, when I paste I get ASCII RTF code—not formatted text. Xsel and xclip can only handle plain text.
On MacOS, the pbpaste and pbcopy commands will automatically set the content type of the clipboard to RTF if there is an RTF header in the data. I'm looking for a Linux program that will do just that.
I need to use it in scripts, so graphical clipboard managers will not work.