|
I'm thinking that the printing option should only print specific xattrs that are requested, though it would be possible to print all of the xattrs with a "*" wildcard. One option is the xattr specified by "--xattr", but that restricts the printing to specific xattrs that match a search criterion. That might be OK because why would we want to print an xattr that is not set on a file?
That said, my preference would be to have an option like "--printf %Lx:XATTR" to print XATTR as ASCII, and "--printf %LX:XATTR" to print XATTR as hex. It isn't totally clear if we want to also print the xattr name, but that could be part of the explicit printf format, like "--printf user.job=%Lx:XATTR" or similar. Alternately, there could be sub-options like "%Lxa:XATTR" to print the value in ASCII format, "%Lxh:XATTR" to print the value in hex, and "%Lxb" to print in base64. I don't think it makes sense to have a "%Lxn:XATTR" to print the xattr name, since that would just be XATTR, unless it is a glob pattern and we want to print the matching xattr names?
|