Skip to content
Snippets Groups Projects
Commit 7dc2266c authored by Andrew Gregory's avatar Andrew Gregory
Browse files

WIP: add python/rust style format strings

--print-format currently uses printf-style format strings, which have
limited namespace (a-zA-Z), low flexibility (depends-with-version and
depends-without-version have to be different sequences), and are
difficult to remember (is %d depends or description?).

Python/Rust format strings allow full word substitutions.  In addition,
the mfmt.c library being used makes it possible to extend the standard
formatting for much greater control.  For example, we can allow nested
templates so that instead of having "{depends}" and
"{depends-without-version}" variants, we can allow something like
"{depends<{name}={version}: {description}>}".

For example:
 pacman -Sp --pformat="{name}: {description} ({packager})" pacman
parent 52eb094a
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment