Allow implicit usage of arg only once

This commit is contained in:
Martchus 2016-06-14 23:11:13 +02:00
parent 980794066b
commit 783121ed5e
1 changed files with 1 additions and 1 deletions

View File

@ -521,7 +521,7 @@ void ArgumentParser::readSpecifiedArgs(ArgumentVector &args, std::size_t &index,
if(!matchingArg) {
// use the first default argument
for(Argument *arg : args) {
if(arg->isImplicit()) {
if(arg->isImplicit() && !arg->isPresent()) {
(matchingArg = arg)->m_indices.push_back(index);
break;
}