Skip to content

Commit

Permalink
Remove ambiguous -v option
Browse files Browse the repository at this point in the history
  • Loading branch information
weisslj committed Dec 20, 2015
1 parent ff68987 commit 27ffb24
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion t/testprog
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def main():
help="This is a really long text... very long indeed! It must be wrapped on normal terminals. "
"Also it should appear not on the same line as the option.")
parser.add_option("-k", action="count", help="how many times?")
parser.add_option("-v", "--verbose", action="store_const", const="100", dest="verbosity", help="be verbose!")
parser.add_option("--verbose", action="store_const", const="100", dest="verbosity", help="be verbose!")
parser.add_option("-s", "--silent", action="store_const", const="0", dest="verbosity", help="be silent!")
parser.add_option("-n", "--number", type="int", default=1, metavar="NUM", help="number of files (default: %default)")
parser.add_option("-H", action="help", help="alternative help")
Expand Down
2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ c
c --str # ambiguous option
c -Z # unknown argument
c --argument-does-not-exist
c -v
c --version
c --help
c "foo bar" baz ""
Expand All @@ -47,7 +48,6 @@ c -x foo
c --clause foo
c --sentence foo
c -k -k -k -k -k
c -v
c --verbose
c -s
c --silent
Expand Down
2 changes: 1 addition & 1 deletion testprog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ int main(int argc, char *argv[])
.help("This is a really long text... very long indeed! It must be wrapped on normal terminals. "
"Also it should appear not on the same line as the option.");
parser.add_option("-k") .action("count") .help("how many times?");
parser.add_option("-v", "--verbose") .action("store_const") .set_const("100") .dest("verbosity") .help("be verbose!");
parser.add_option("--verbose") .action("store_const") .set_const("100") .dest("verbosity") .help("be verbose!");
parser.add_option("-s", "--silent") .action("store_const") .set_const("0") .dest("verbosity") .help("be silent!");
parser.add_option("-n", "--number") .type("int") .set_default("1") .metavar("NUM") .help("number of files (default: %default)");
parser.add_option("-H") .action("help") .help("alternative help");
Expand Down

0 comments on commit 27ffb24

Please sign in to comment.