Ver.end() == false; ++Ver)
{
ListSingleVersion(CacheFile, records, Ver, outs, include_summary);
+ outs << "\n";
}
}
/*}}}*/
// FIXME: SORT! and make sorting flexible (alphabetic, by pkg status)
// output the sorted map
for (K = output_map.begin(); K != output_map.end(); ++K)
- std::cout << (*K).second;
+ std::cout << (*K).second << std::endl;
// be nice and tell the user if there is more to see
output = SubstVar(output, "${Version}", GetVersion(CacheFile, V));
output = SubstVar(output, "${Description}", GetShortDescription(CacheFile, records, P));
output = SubstVar(output, "${Origin}", GetArchiveSuite(CacheFile, V));
- out << output << std::endl;
+ out << output;
} else {
// raring/linux-kernel version [upradable: new-version]
// description
baz/unstable 2.0 all [upgradable from: 0.1]
N: There are 2 additional versions. Please use the '-a' switch to see them." apt list baz -o quiet=0
-
+# test format strings for machine parseable output
+apt list -qq bar baz -o APT::Cmd::use-format=true -o APT::Cmd::format="\${Package} - \${installed:Version} - \${candidate:Version}" > output.txt
+testequal "bar - 1.0 - 1.0
+baz - 0.1 - 2.0" cat output.txt