diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-12-19 10:22:43 -0800 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-12-19 10:22:43 -0800 |
| commit | a6ee2c145fca2006848ef9afbf580ea88bee7dd1 (patch) | |
| tree | 7fd2134ce71a02aa3b854eed44e7a9ebf0abca45 /toolsrc | |
| parent | 5ac69dd02bef426d71ed1e58923345c9042c37dc (diff) | |
| download | vcpkg-a6ee2c145fca2006848ef9afbf580ea88bee7dd1.tar.gz vcpkg-a6ee2c145fca2006848ef9afbf580ea88bee7dd1.zip | |
[vcpkg-list] Improve list output for long triplets
Diffstat (limited to 'toolsrc')
| -rw-r--r-- | toolsrc/src/vcpkg/binaryparagraph.cpp | 5 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg/commands.list.cpp | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/toolsrc/src/vcpkg/binaryparagraph.cpp b/toolsrc/src/vcpkg/binaryparagraph.cpp index c7136b713..7c9e905e8 100644 --- a/toolsrc/src/vcpkg/binaryparagraph.cpp +++ b/toolsrc/src/vcpkg/binaryparagraph.cpp @@ -92,8 +92,9 @@ namespace vcpkg std::string BinaryParagraph::displayname() const { - const auto f = this->feature.empty() ? "core" : this->feature; - return Strings::format("%s[%s]:%s", this->spec.name(), f, this->spec.triplet()); + if (this->feature.empty() || this->feature == "core") + return Strings::format("%s:%s", this->spec.name(), this->spec.triplet()); + return Strings::format("%s[%s]:%s", this->spec.name(), this->feature, this->spec.triplet()); } std::string BinaryParagraph::dir() const { return this->spec.dir(); } diff --git a/toolsrc/src/vcpkg/commands.list.cpp b/toolsrc/src/vcpkg/commands.list.cpp index 1f2387843..960c57225 100644 --- a/toolsrc/src/vcpkg/commands.list.cpp +++ b/toolsrc/src/vcpkg/commands.list.cpp @@ -13,14 +13,14 @@ namespace vcpkg::Commands::List { if (full_desc) { - System::println("%-30s %-16s %s", pgh.package.displayname(), pgh.package.version, pgh.package.description); + System::println("%-50s %-16s %s", pgh.package.displayname(), pgh.package.version, pgh.package.description); } else { - System::println("%-30s %-16s %s", - vcpkg::shorten_text(pgh.package.displayname(), 30), + System::println("%-50s %-16s %s", + vcpkg::shorten_text(pgh.package.displayname(), 50), vcpkg::shorten_text(pgh.package.version, 16), - vcpkg::shorten_text(pgh.package.description, 71)); + vcpkg::shorten_text(pgh.package.description, 51)); } } |
