Add support for a %(trimr) format function, which behaves exactly
like %(trim) but also returns a string. Turns out this is literally
a one-line change that does not require a new format instruction.
component
unquote expr string remove RFC 2822 quotes from \fIstr\fR
trim expr trim trailing whitespace from \fIstr\fR
component
unquote expr string remove RFC 2822 quotes from \fIstr\fR
trim expr trim trailing whitespace from \fIstr\fR
+trimr expr string Like %(trim), also returns string
kilo expr string express in SI units: 15.9K, 2.3M, etc.
%(kilo) scales by factors of 1000,
kibi expr string express in IEC units: 15.5Ki, 2.2Mi.
kilo expr string express in SI units: 15.9K, 2.3M, etc.
%(kilo) scales by factors of 1000,
kibi expr string express in IEC units: 15.5Ki, 2.2Mi.
{ "decodecomp", TF_COMP, FT_LS_DECODECOMP, 0, TFL_PUTS },
{ "decode", TF_EXPR, FT_LS_DECODE, 0, TFL_PUTS },
{ "trim", TF_EXPR, FT_LS_TRIM, 0, 0 },
{ "decodecomp", TF_COMP, FT_LS_DECODECOMP, 0, TFL_PUTS },
{ "decode", TF_EXPR, FT_LS_DECODE, 0, TFL_PUTS },
{ "trim", TF_EXPR, FT_LS_TRIM, 0, 0 },
+ { "trimr", TF_EXPR, FT_LS_TRIM, 0, TFL_PUTS },
{ "kilo", TF_EXPR, FT_LS_KILO, 0, TFL_PUTS },
{ "kibi", TF_EXPR, FT_LS_KIBI, 0, TFL_PUTS },
{ "compval", TF_COMP, FT_LV_COMP, 0, TFL_PUTN },
{ "kilo", TF_EXPR, FT_LS_KILO, 0, TFL_PUTS },
{ "kibi", TF_EXPR, FT_LS_KIBI, 0, TFL_PUTS },
{ "compval", TF_COMP, FT_LV_COMP, 0, TFL_PUTN },