For example, xclip could look for input coming from a file when -t is not specified, and then set the target appropriately based on file --mime-type --brief FILENAME. This effect could be limited to only the CLIPBOARD selection, since PRIMARY and SECONDARY do often contain just text. (That's my preference). Or, it could be triggered by a special option, such as -t auto.
It would be beneficial to users if xclip was smart enough to call
file
(if available) on documents being read and set the target appropriately.could more easily be typed as
For example, xclip could look for input coming from a file when -t is not specified, and then set the target appropriately based on
file --mime-type --brief FILENAME
. This effect could be limited to only the CLIPBOARD selection, since PRIMARY and SECONDARY do often contain just text. (That's my preference). Or, it could be triggered by a special option, such as-t auto
.