#988291 aptitude: strange search output when using tabs in --display-format

Package:
aptitude
Source:
aptitude
Description:
terminal-based package manager
Submitter:
Christoph Anton Mitterer
Date:
2021-05-09 18:30:02 UTC
Severity:
normal
#988291#5
Date:
2021-05-09 18:15:33 UTC
From:
To:

Hi.


When using tabs in --display-format, then output is kinda strange.

E.g.:

$ aptitude --disable-columns --display-format $'%c%M\t%p' search '?obsolete'
iA      libdvdcss2
iA	libqb0
iA	usbguard-applet-qt

has spacces in the first line (between iA and libdvdcss2 and also *after* libdvdcss2,
but results are fine for the other two, that is \t between iA and libqb0 respectively
usbguard-applet-qt and no spaces after the package names.


It seems to be always the first line, though I could have sworn that last night
when first stumbling over this, I found that the addittion of ? and/or # to the
%<X> fields solved the problem (despite having --disable-columns) ... but I cannot
reproduce this now.



Cheers,
Chris.

#988291#10
Date:
2021-05-09 18:27:36 UTC
From:
To:
One addition I just found out:

It seems that the erroneous spaces in the first line are only printed,
when stdout is a terminal, at least when doing:
at  | cat  afterwards, it works fine.