mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-09-10 20:57:06 -04:00
Formatting change: Don't print space after elipsis in usage
This commit is contained in:
parent
9ccc290a07
commit
5489dc9597
@ -134,7 +134,7 @@ inline void DocBookOutput::usage(CmdLineInterface& _cmd )
|
|||||||
|
|
||||||
std::cout << "</group>" << std::endl;
|
std::cout << "</group>" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// rest of args
|
// rest of args
|
||||||
for (ArgListIterator it = argList.begin(); it != argList.end(); it++)
|
for (ArgListIterator it = argList.begin(); it != argList.end(); it++)
|
||||||
if ( !xorHandler.contains( (*it) ) )
|
if ( !xorHandler.contains( (*it) ) )
|
||||||
@ -242,6 +242,7 @@ inline void DocBookOutput::printShortArg(Arg* a)
|
|||||||
removeChar(arg,']');
|
removeChar(arg,']');
|
||||||
removeChar(arg,'<');
|
removeChar(arg,'<');
|
||||||
removeChar(arg,'>');
|
removeChar(arg,'>');
|
||||||
|
removeChar(arg,'.');
|
||||||
arg.erase(0, arg.find_last_of(theDelimiter) + 1);
|
arg.erase(0, arg.find_last_of(theDelimiter) + 1);
|
||||||
std::cout << theDelimiter;
|
std::cout << theDelimiter;
|
||||||
std::cout << "<replaceable>" << arg << "</replaceable>";
|
std::cout << "<replaceable>" << arg << "</replaceable>";
|
||||||
@ -280,6 +281,7 @@ inline void DocBookOutput::printLongArg(Arg* a)
|
|||||||
removeChar(arg,']');
|
removeChar(arg,']');
|
||||||
removeChar(arg,'<');
|
removeChar(arg,'<');
|
||||||
removeChar(arg,'>');
|
removeChar(arg,'>');
|
||||||
|
removeChar(arg,'.');
|
||||||
arg.erase(0, arg.find_last_of(theDelimiter) + 1);
|
arg.erase(0, arg.find_last_of(theDelimiter) + 1);
|
||||||
std::cout << theDelimiter;
|
std::cout << theDelimiter;
|
||||||
std::cout << "<replaceable>" << arg << "</replaceable>";
|
std::cout << "<replaceable>" << arg << "</replaceable>";
|
||||||
|
@ -359,7 +359,7 @@ template<class T>
|
|||||||
std::string MultiArg<T>::shortID(const std::string& val) const
|
std::string MultiArg<T>::shortID(const std::string& val) const
|
||||||
{
|
{
|
||||||
static_cast<void>(val); // Ignore input, don't warn
|
static_cast<void>(val); // Ignore input, don't warn
|
||||||
return Arg::shortID(_typeDesc) + " ... ";
|
return Arg::shortID(_typeDesc) + " ...";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -190,7 +190,7 @@ inline bool MultiSwitchArg::processArg(int *i, std::vector<std::string>& args)
|
|||||||
inline std::string
|
inline std::string
|
||||||
MultiSwitchArg::shortID(const std::string& val) const
|
MultiSwitchArg::shortID(const std::string& val) const
|
||||||
{
|
{
|
||||||
return Arg::shortID(val) + " ... ";
|
return Arg::shortID(val) + " ...";
|
||||||
}
|
}
|
||||||
|
|
||||||
inline std::string
|
inline std::string
|
||||||
|
@ -237,8 +237,8 @@ inline void ZshCompletionOutput::printOption(Arg* a, std::string mutex)
|
|||||||
if ( a->isValueRequired() )
|
if ( a->isValueRequired() )
|
||||||
{
|
{
|
||||||
std::string arg = a->shortID();
|
std::string arg = a->shortID();
|
||||||
// Example arg: "[-A <integer>] ... "
|
// Example arg: "[-A <integer>] ..."
|
||||||
size_t pos = arg.rfind(" ... ");
|
size_t pos = arg.rfind(" ...");
|
||||||
if (pos != std::string::npos) {
|
if (pos != std::string::npos) {
|
||||||
arg.erase(pos);
|
arg.erase(pos);
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@ PARSE ERROR: Argument: (--stringTest)
|
|||||||
Couldn't find delimiter for this argument!
|
Couldn't find delimiter for this argument!
|
||||||
|
|
||||||
Brief USAGE:
|
Brief USAGE:
|
||||||
../examples/test3 [-f=<float>] ... [-i=<int>] ...
|
../examples/test3 [-f=<float>] ... [-i=<int>] ... --stringTest=<string>
|
||||||
--stringTest=<string> [-B] [--] [--version] [-h]
|
[-B] [--] [--version] [-h] <string> <string>
|
||||||
<string> <string> <fileNameString> ...
|
<fileNameString> ...
|
||||||
|
|
||||||
For complete USAGE and HELP type:
|
For complete USAGE and HELP type:
|
||||||
../examples/test3 --help
|
../examples/test3 --help
|
||||||
|
@ -2,9 +2,9 @@ PARSE ERROR: Argument: (--stringTest)
|
|||||||
Couldn't find delimiter for this argument!
|
Couldn't find delimiter for this argument!
|
||||||
|
|
||||||
Brief USAGE:
|
Brief USAGE:
|
||||||
../examples/test3 [-f=<float>] ... [-i=<int>] ...
|
../examples/test3 [-f=<float>] ... [-i=<int>] ... --stringTest=<string>
|
||||||
--stringTest=<string> [-B] [--] [--version] [-h]
|
[-B] [--] [--version] [-h] <string> <string>
|
||||||
<string> <string> <fileNameString> ...
|
<fileNameString> ...
|
||||||
|
|
||||||
For complete USAGE and HELP type:
|
For complete USAGE and HELP type:
|
||||||
../examples/test3 --help
|
../examples/test3 --help
|
||||||
|
@ -2,9 +2,9 @@ PARSE ERROR:
|
|||||||
Required argument missing: unTest2
|
Required argument missing: unTest2
|
||||||
|
|
||||||
Brief USAGE:
|
Brief USAGE:
|
||||||
../examples/test3 [-f=<float>] ... [-i=<int>] ...
|
../examples/test3 [-f=<float>] ... [-i=<int>] ... --stringTest=<string>
|
||||||
--stringTest=<string> [-B] [--] [--version] [-h]
|
[-B] [--] [--version] [-h] <string> <string>
|
||||||
<string> <string> <fileNameString> ...
|
<fileNameString> ...
|
||||||
|
|
||||||
For complete USAGE and HELP type:
|
For complete USAGE and HELP type:
|
||||||
../examples/test3 --help
|
../examples/test3 --help
|
||||||
|
@ -3,8 +3,8 @@ PARSE ERROR: Argument: -b (--bbb)
|
|||||||
|
|
||||||
Brief USAGE:
|
Brief USAGE:
|
||||||
../examples/test5 {-a <string>|-b <string>} {--eee <string>|--fff
|
../examples/test5 {-a <string>|-b <string>} {--eee <string>|--fff
|
||||||
<string>|-g <string>} {-i <string> ... |-j <string>
|
<string>|-g <string>} {-i <string> ...|-j <string>
|
||||||
... } [--ddd] -c <string> [--] [--version] [-h]
|
...} [--ddd] -c <string> [--] [--version] [-h]
|
||||||
|
|
||||||
For complete USAGE and HELP type:
|
For complete USAGE and HELP type:
|
||||||
../examples/test5 --help
|
../examples/test5 --help
|
||||||
|
@ -3,8 +3,8 @@ PARSE ERROR: Argument: -d
|
|||||||
|
|
||||||
Brief USAGE:
|
Brief USAGE:
|
||||||
../examples/test5 {-a <string>|-b <string>} {--eee <string>|--fff
|
../examples/test5 {-a <string>|-b <string>} {--eee <string>|--fff
|
||||||
<string>|-g <string>} {-i <string> ... |-j <string>
|
<string>|-g <string>} {-i <string> ...|-j <string>
|
||||||
... } [--ddd] -c <string> [--] [--version] [-h]
|
...} [--ddd] -c <string> [--] [--version] [-h]
|
||||||
|
|
||||||
For complete USAGE and HELP type:
|
For complete USAGE and HELP type:
|
||||||
../examples/test5 --help
|
../examples/test5 --help
|
||||||
|
@ -3,8 +3,8 @@ PARSE ERROR: Argument: -b (--bbb)
|
|||||||
|
|
||||||
Brief USAGE:
|
Brief USAGE:
|
||||||
../examples/test5 {-a <string>|-b <string>} {--eee <string>|--fff
|
../examples/test5 {-a <string>|-b <string>} {--eee <string>|--fff
|
||||||
<string>|-g <string>} {-i <string> ... |-j <string>
|
<string>|-g <string>} {-i <string> ...|-j <string>
|
||||||
... } [--ddd] -c <string> [--] [--version] [-h]
|
...} [--ddd] -c <string> [--] [--version] [-h]
|
||||||
|
|
||||||
For complete USAGE and HELP type:
|
For complete USAGE and HELP type:
|
||||||
../examples/test5 --help
|
../examples/test5 --help
|
||||||
|
@ -2,9 +2,9 @@ PARSE ERROR: Argument: -i (--intTest)
|
|||||||
Couldn't read argument value from string '9a'
|
Couldn't read argument value from string '9a'
|
||||||
|
|
||||||
Brief USAGE:
|
Brief USAGE:
|
||||||
../examples/test3 [-f=<float>] ... [-i=<int>] ...
|
../examples/test3 [-f=<float>] ... [-i=<int>] ... --stringTest=<string>
|
||||||
--stringTest=<string> [-B] [--] [--version] [-h]
|
[-B] [--] [--version] [-h] <string> <string>
|
||||||
<string> <string> <fileNameString> ...
|
<fileNameString> ...
|
||||||
|
|
||||||
For complete USAGE and HELP type:
|
For complete USAGE and HELP type:
|
||||||
../examples/test3 --help
|
../examples/test3 --help
|
||||||
|
@ -2,9 +2,9 @@ PARSE ERROR: Argument: -f (--floatTest)
|
|||||||
More than one valid value parsed from string '1.0.0'
|
More than one valid value parsed from string '1.0.0'
|
||||||
|
|
||||||
Brief USAGE:
|
Brief USAGE:
|
||||||
../examples/test3 [-f=<float>] ... [-i=<int>] ...
|
../examples/test3 [-f=<float>] ... [-i=<int>] ... --stringTest=<string>
|
||||||
--stringTest=<string> [-B] [--] [--version] [-h]
|
[-B] [--] [--version] [-h] <string> <string>
|
||||||
<string> <string> <fileNameString> ...
|
<fileNameString> ...
|
||||||
|
|
||||||
For complete USAGE and HELP type:
|
For complete USAGE and HELP type:
|
||||||
../examples/test3 --help
|
../examples/test3 --help
|
||||||
|
@ -9,7 +9,7 @@ Brief USAGE:
|
|||||||
<filename>] [-x <filename>] [-s
|
<filename>] [-x <filename>] [-s
|
||||||
<name string>] [-d] [-g <negative
|
<name string>] [-d] [-g <negative
|
||||||
int>] [-f <negative int>] -n <homer
|
int>] [-f <negative int>] -n <homer
|
||||||
|marge|bart|lisa|maggie> ... [--]
|
|marge|bart|lisa|maggie> ... [--]
|
||||||
[--version] [-h] <1|2|3> ...
|
[--version] [-h] <1|2|3> ...
|
||||||
|
|
||||||
For complete USAGE and HELP type:
|
For complete USAGE and HELP type:
|
||||||
|
@ -9,7 +9,7 @@ Brief USAGE:
|
|||||||
<filename>] [-x <filename>] [-s
|
<filename>] [-x <filename>] [-s
|
||||||
<name string>] [-d] [-g <negative
|
<name string>] [-d] [-g <negative
|
||||||
int>] [-f <negative int>] -n <homer
|
int>] [-f <negative int>] -n <homer
|
||||||
|marge|bart|lisa|maggie> ... [--]
|
|marge|bart|lisa|maggie> ... [--]
|
||||||
[--version] [-h] <1|2|3> ...
|
[--version] [-h] <1|2|3> ...
|
||||||
|
|
||||||
For complete USAGE and HELP type:
|
For complete USAGE and HELP type:
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
USAGE:
|
USAGE:
|
||||||
|
|
||||||
../examples/test3 [-f=<float>] ... [-i=<int>] ...
|
../examples/test3 [-f=<float>] ... [-i=<int>] ... --stringTest=<string>
|
||||||
--stringTest=<string> [-B] [--] [--version] [-h]
|
[-B] [--] [--version] [-h] <string> <string>
|
||||||
<string> <string> <fileNameString> ...
|
<fileNameString> ...
|
||||||
|
|
||||||
|
|
||||||
Where:
|
Where:
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
USAGE:
|
USAGE:
|
||||||
|
|
||||||
../examples/test5 {-a <string>|-b <string>} {--eee <string>|--fff
|
../examples/test5 {-a <string>|-b <string>} {--eee <string>|--fff
|
||||||
<string>|-g <string>} {-i <string> ... |-j <string>
|
<string>|-g <string>} {-i <string> ...|-j <string>
|
||||||
... } [--ddd] -c <string> [--] [--version] [-h]
|
...} [--ddd] -c <string> [--] [--version] [-h]
|
||||||
|
|
||||||
|
|
||||||
Where:
|
Where:
|
||||||
|
@ -8,7 +8,7 @@ USAGE:
|
|||||||
<filename>] [-x <filename>] [-s
|
<filename>] [-x <filename>] [-s
|
||||||
<name string>] [-d] [-g <negative
|
<name string>] [-d] [-g <negative
|
||||||
int>] [-f <negative int>] -n <homer
|
int>] [-f <negative int>] -n <homer
|
||||||
|marge|bart|lisa|maggie> ... [--]
|
|marge|bart|lisa|maggie> ... [--]
|
||||||
[--version] [-h] <1|2|3> ...
|
[--version] [-h] <1|2|3> ...
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,9 +2,9 @@ PARSE ERROR: Argument: -s (--stringTest)
|
|||||||
Couldn't find delimiter for this argument!
|
Couldn't find delimiter for this argument!
|
||||||
|
|
||||||
Brief USAGE:
|
Brief USAGE:
|
||||||
../examples/test8 [-f=<float>] ... [-i=<int>] ... -s=<string> [-B]
|
../examples/test8 [-f=<float>] ... [-i=<int>] ... -s=<string> [-B] [--]
|
||||||
[--] [--version] [-h] <string> <string>
|
[--version] [-h] <string> <string> <fileNameString>
|
||||||
<fileNameString> ...
|
...
|
||||||
|
|
||||||
For complete USAGE and HELP type:
|
For complete USAGE and HELP type:
|
||||||
../examples/test8 --help
|
../examples/test8 --help
|
||||||
|
@ -2,9 +2,9 @@ PARSE ERROR: Argument: -s (--stringTest)
|
|||||||
Couldn't find delimiter for this argument!
|
Couldn't find delimiter for this argument!
|
||||||
|
|
||||||
Brief USAGE:
|
Brief USAGE:
|
||||||
../examples/test8 [-f=<float>] ... [-i=<int>] ... -s=<string> [-B]
|
../examples/test8 [-f=<float>] ... [-i=<int>] ... -s=<string> [-B] [--]
|
||||||
[--] [--version] [-h] <string> <string>
|
[--version] [-h] <string> <string> <fileNameString>
|
||||||
<fileNameString> ...
|
...
|
||||||
|
|
||||||
For complete USAGE and HELP type:
|
For complete USAGE and HELP type:
|
||||||
../examples/test8 --help
|
../examples/test8 --help
|
||||||
|
@ -2,9 +2,9 @@ PARSE ERROR:
|
|||||||
Required argument missing: unTest2
|
Required argument missing: unTest2
|
||||||
|
|
||||||
Brief USAGE:
|
Brief USAGE:
|
||||||
../examples/test8 [-f=<float>] ... [-i=<int>] ... -s=<string> [-B]
|
../examples/test8 [-f=<float>] ... [-i=<int>] ... -s=<string> [-B] [--]
|
||||||
[--] [--version] [-h] <string> <string>
|
[--version] [-h] <string> <string> <fileNameString>
|
||||||
<fileNameString> ...
|
...
|
||||||
|
|
||||||
For complete USAGE and HELP type:
|
For complete USAGE and HELP type:
|
||||||
../examples/test8 --help
|
../examples/test8 --help
|
||||||
|
@ -2,9 +2,9 @@ PARSE ERROR: Argument: -i (--intTest)
|
|||||||
Couldn't read argument value from string '9a'
|
Couldn't read argument value from string '9a'
|
||||||
|
|
||||||
Brief USAGE:
|
Brief USAGE:
|
||||||
../examples/test8 [-f=<float>] ... [-i=<int>] ... -s=<string> [-B]
|
../examples/test8 [-f=<float>] ... [-i=<int>] ... -s=<string> [-B] [--]
|
||||||
[--] [--version] [-h] <string> <string>
|
[--version] [-h] <string> <string> <fileNameString>
|
||||||
<fileNameString> ...
|
...
|
||||||
|
|
||||||
For complete USAGE and HELP type:
|
For complete USAGE and HELP type:
|
||||||
../examples/test8 --help
|
../examples/test8 --help
|
||||||
|
@ -2,9 +2,9 @@ PARSE ERROR: Argument: -f (--floatTest)
|
|||||||
More than one valid value parsed from string '1.0.0'
|
More than one valid value parsed from string '1.0.0'
|
||||||
|
|
||||||
Brief USAGE:
|
Brief USAGE:
|
||||||
../examples/test8 [-f=<float>] ... [-i=<int>] ... -s=<string> [-B]
|
../examples/test8 [-f=<float>] ... [-i=<int>] ... -s=<string> [-B] [--]
|
||||||
[--] [--version] [-h] <string> <string>
|
[--version] [-h] <string> <string> <fileNameString>
|
||||||
<fileNameString> ...
|
...
|
||||||
|
|
||||||
For complete USAGE and HELP type:
|
For complete USAGE and HELP type:
|
||||||
../examples/test8 --help
|
../examples/test8 --help
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
USAGE:
|
USAGE:
|
||||||
|
|
||||||
../examples/test8 [-f=<float>] ... [-i=<int>] ... -s=<string> [-B]
|
../examples/test8 [-f=<float>] ... [-i=<int>] ... -s=<string> [-B] [--]
|
||||||
[--] [--version] [-h] <string> <string>
|
[--version] [-h] <string> <string> <fileNameString>
|
||||||
<fileNameString> ...
|
...
|
||||||
|
|
||||||
|
|
||||||
Where:
|
Where:
|
||||||
|
@ -3,8 +3,8 @@ PARSE ERROR: Argument: -i (--iii)
|
|||||||
|
|
||||||
Brief USAGE:
|
Brief USAGE:
|
||||||
../examples/test5 {-a <string>|-b <string>} {--eee <string>|--fff
|
../examples/test5 {-a <string>|-b <string>} {--eee <string>|--fff
|
||||||
<string>|-g <string>} {-i <string> ... |-j <string>
|
<string>|-g <string>} {-i <string> ...|-j <string>
|
||||||
... } [--ddd] -c <string> [--] [--version] [-h]
|
...} [--ddd] -c <string> [--] [--version] [-h]
|
||||||
|
|
||||||
For complete USAGE and HELP type:
|
For complete USAGE and HELP type:
|
||||||
../examples/test5 --help
|
../examples/test5 --help
|
||||||
|
@ -4,7 +4,7 @@ PARSE ERROR: Argument: -r (--reverse)
|
|||||||
|
|
||||||
USAGE:
|
USAGE:
|
||||||
|
|
||||||
../examples/test9 [-N] ... [-V] ... [-r] [--] <won't see this>
|
../examples/test9 [-N] ... [-V] ... [-r] [--] <won't see this>
|
||||||
|
|
||||||
|
|
||||||
Where:
|
Where:
|
||||||
|
@ -2,7 +2,7 @@ PARSE ERROR:
|
|||||||
Required argument missing: vect
|
Required argument missing: vect
|
||||||
|
|
||||||
Brief USAGE:
|
Brief USAGE:
|
||||||
../examples/test12 -v <3D vector> ... [--] [--version] [-h]
|
../examples/test12 -v <3D vector> ... [--] [--version] [-h]
|
||||||
|
|
||||||
For complete USAGE and HELP type:
|
For complete USAGE and HELP type:
|
||||||
../examples/test12 --help
|
../examples/test12 --help
|
||||||
|
@ -2,7 +2,7 @@ PARSE ERROR: Argument: -v (--vect)
|
|||||||
a 1 0.3 is not a 3D vector
|
a 1 0.3 is not a 3D vector
|
||||||
|
|
||||||
Brief USAGE:
|
Brief USAGE:
|
||||||
../examples/test12 -v <3D vector> ... [--] [--version] [-h]
|
../examples/test12 -v <3D vector> ... [--] [--version] [-h]
|
||||||
|
|
||||||
For complete USAGE and HELP type:
|
For complete USAGE and HELP type:
|
||||||
../examples/test12 --help
|
../examples/test12 --help
|
||||||
|
Loading…
x
Reference in New Issue
Block a user