mirror of https://github.com/aria2/aria2
2009-01-27 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Remove leading "--" from help keyword and a substring after "=" from help keyword, so that one can query options by '-h--max-' or '-hmax-peers=10'. * src/option_processing.ccpull/1/head
parent
873231fe1e
commit
120ea4c609
|
@ -1,3 +1,10 @@
|
||||||
|
2009-01-27 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
|
Remove leading "--" from help keyword and a substring after "="
|
||||||
|
from help keyword, so that one can query options by '-h--max-' or
|
||||||
|
'-hmax-peers=10'.
|
||||||
|
* src/option_processing.cc
|
||||||
|
|
||||||
2009-01-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
2009-01-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
Rewritten PStringVisitor and its implementation.
|
Rewritten PStringVisitor and its implementation.
|
||||||
|
|
|
@ -578,13 +578,20 @@ Option* option_processing(int argc, char* const argv[])
|
||||||
exit(DownloadResult::FINISHED);
|
exit(DownloadResult::FINISHED);
|
||||||
case 'h':
|
case 'h':
|
||||||
{
|
{
|
||||||
std::string category;
|
std::string keyword;
|
||||||
if(optarg == 0 || strlen(optarg) == 0) {
|
if(optarg == 0 || strlen(optarg) == 0) {
|
||||||
category = TAG_BASIC;
|
keyword = TAG_BASIC;
|
||||||
} else {
|
} else {
|
||||||
category = optarg;
|
keyword = optarg;
|
||||||
|
if(Util::startsWith(keyword, "--")) {
|
||||||
|
keyword = keyword.substr(2);
|
||||||
}
|
}
|
||||||
showUsage(category, oparser);
|
std::string::size_type eqpos = keyword.find("=");
|
||||||
|
if(eqpos != std::string::npos) {
|
||||||
|
keyword = keyword.substr(0, eqpos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
showUsage(keyword, oparser);
|
||||||
exit(DownloadResult::FINISHED);
|
exit(DownloadResult::FINISHED);
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue