diff --git a/diceware/diceware.py b/diceware/diceware.py index 6eed895b7eeb87145317ea4360292db11cb9d8ba..533185ded302afda7cb442541a4d7055dd4c72a1 100644 --- a/diceware/diceware.py +++ b/diceware/diceware.py @@ -25,10 +25,10 @@ def handle_options(args): help='number of words to concatenate. Default: 6') cap_group = parser.add_mutually_exclusive_group() cap_group.add_argument( - '-c', '--capitalize', action='store_true', + '-c', '--caps', action='store_true', help='Capitalize words. This is the default.') cap_group.add_argument( - '--no-capitalize', action='store_false', dest='capitalize', + '--no-caps', action='store_false', dest='capitalize', help='Turn off capitalization.') parser.set_defaults(capitalize=True) args = parser.parse_args(args) diff --git a/tests/test_diceware.py b/tests/test_diceware.py index d5e819f12d3946b87fc19afa59713008895260fd..83cb89a60b440d9f194c46789bf36a37bd3c6e3d 100644 --- a/tests/test_diceware.py +++ b/tests/test_diceware.py @@ -119,15 +119,15 @@ class TestDicewareModule(object): out = out.replace( os.path.basename(sys.argv[0]), 'diceware') assert out == ( - 'usage: diceware [-h] [-n NUM] [-c | --no-capitalize]\n' + 'usage: diceware [-h] [-n NUM] [-c | --no-caps]\n' '\n' 'Create a passphrase\n' '\n' 'optional arguments:\n' ' -h, --help show this help message and exit\n' ' -n NUM, --num NUM number of words to concatenate. Default: 6\n' - ' -c, --capitalize Capitalize words. This is the default.\n' - ' --no-capitalize Turn off capitalization.\n' + ' -c, --caps Capitalize words. This is the default.\n' + ' --no-caps Turn off capitalization.\n' ) def test_main_argv(self, argv_handler):