From 01b8a6eb4d20a1aaa4cd72be1dd9e0f2ca3bac7c Mon Sep 17 00:00:00 2001 From: Sylvain Joubert Date: Tue, 5 Mar 2019 11:34:48 +0100 Subject: [PATCH] Fix README and help text for boolean option --- README.md | 4 ++-- yaml_cli/__init__.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1a8218a..2903f21 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ optional arguments: -n KEY VAL, --number KEY VAL Set key with number value: mykey:subkey:subkey 3.7 -b KEY VAL, --boolean KEY VAL - Set key with number value: mykey:subkey:subkey true + Set key with boolean value: mykey:subkey:subkey true (possible values: ('1', 'true', 'True', 'yes') ('', '0', 'false', 'False', 'no')) -l KEY [VAL ...], --list KEY [VAL ...] @@ -94,4 +94,4 @@ optional arguments: - \ No newline at end of file + diff --git a/yaml_cli/__init__.py b/yaml_cli/__init__.py index 9db9153..f7c29d2 100755 --- a/yaml_cli/__init__.py +++ b/yaml_cli/__init__.py @@ -30,7 +30,7 @@ def __init__(self): parser.add_argument('-d', '--delete', action=RmKeyAction, help="Delete key: {}. Skipped silently if key doesn't exist.".format(HELP_KEY_SYNTAX)) parser.add_argument('-s', '--string', action=KeyValueAction, help="Set key with string value: {} 'my value'".format(HELP_KEY_SYNTAX)) parser.add_argument('-n', '--number', action=NumberKeyValueAction, help="Set key with number value: {} 3.7".format(HELP_KEY_SYNTAX)) - parser.add_argument('-b', '--boolean', action=BooleanKeyValueAction, help="Set key with number value: {} true (possible values: {} {})".format(HELP_KEY_SYNTAX, BOOLEAN_VALUES_TRUE, BOOLEAN_VALUES_FALSE)) + parser.add_argument('-b', '--boolean', action=BooleanKeyValueAction, help="Set key with boolean value: {} true (possible values: {} {})".format(HELP_KEY_SYNTAX, BOOLEAN_VALUES_TRUE, BOOLEAN_VALUES_FALSE)) parser.add_argument('-l', '--list', action=ListKeyValueAction, help="Set key with value as list of strings: {} intem1 intem2 intem3".format(HELP_KEY_SYNTAX)) parser.add_argument('--null', action=NullKeyAction, help="Set key with null value: {}".format(HELP_KEY_SYNTAX)) parser.add_argument('-la', '--list-append', action='store_true', help="If a key to set already exists, do not replace it but instead create a list and append.")