X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbuildercli.cpp;h=c0a4f06c8f10c1b692b39c7a79798cf361a362e6;hb=000deb52a1374bcedfec5d201c53c1842438ceba;hp=7f6ee687728fbaeecc7ef526d0fb16bdb0b84f41;hpb=24af1ff16ad1584ee10ef7b9798f340048c5dfff;p=builder.git diff --git a/source/buildercli.cpp b/source/buildercli.cpp index 7f6ee68..c0a4f06 100644 --- a/source/buildercli.cpp +++ b/source/buildercli.cpp @@ -354,10 +354,21 @@ void BuilderCLI::package_help() for(Config::OptionMap::const_iterator i=options.begin(); i!=options.end(); ++i) { const Config::Option &opt = i->second; - IO::print(" %s: %s (%s)", opt.name, opt.description, opt.value); - if(opt.value!=opt.default_value) - IO::print(" [%s]", opt.default_value); - IO::print("\n"); + string line = format(" %s: %s (%s)", opt.name, opt.description, opt.value); + if(!opt.choices.empty()) + { + line += " {"; + for(list::const_iterator j=opt.choices.begin(); j!=opt.choices.end(); ++j) + { + if(j!=opt.choices.begin()) + line += ' '; + line += *j; + } + line += '}'; + } + else if(opt.value!=opt.default_value) + line += format(" [%s]", opt.default_value); + IO::print("%s\n", line); } } }