1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00

Refactor: use optionalBracket in nix search

This commit is contained in:
Robert Hensing 2025-10-13 14:02:59 +02:00
parent 5dcfddf997
commit 583f5e37fc

View file

@ -159,7 +159,7 @@ struct CmdSearch : InstallableValueCommand, MixJSON
logger->cout(
"* %s%s",
wrap("\e[0;1m", hiliteMatches(attrPath2, attrPathMatches, ANSI_GREEN, "\e[0;1m")),
name.version != "" ? " (" + name.version + ")" : "");
optionalBracket(" (", name.version, ")"));
if (description != "")
logger->cout(
" %s", hiliteMatches(description, descriptionMatches, ANSI_GREEN, ANSI_NORMAL));