summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Brunet <charles.brunet@optelgroup.com>2023-02-23 16:45:27 -0500
committerJussi Pakkanen <jpakkane@gmail.com>2023-03-14 16:22:05 +0200
commit7fcc9a95bd446a188fdd9f4a334770cd04052f90 (patch)
tree9043e0aa83861caf1b616a3ec661ce7d35677aab
parentd4d118438dacd97e91bbb325fded28f2dd356bb7 (diff)
downloadmeson-7fcc9a95bd446a188fdd9f4a334770cd04052f90.tar.gz
rewriter: add missing command aliases
-rw-r--r--mesonbuild/rewriter.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/rewriter.py b/mesonbuild/rewriter.py
index 0e051cba7..03e4bc95a 100644
--- a/mesonbuild/rewriter.py
+++ b/mesonbuild/rewriter.py
@@ -45,7 +45,7 @@ def add_arguments(parser, formatter=None):
subparsers = parser.add_subparsers(dest='type', title='Rewriter commands', description='Rewrite command to execute')
# Target
- tgt_parser = subparsers.add_parser('target', help='Modify a target', formatter_class=formatter)
+ tgt_parser = subparsers.add_parser('target', aliases=['tgt'], help='Modify a target', formatter_class=formatter)
tgt_parser.add_argument('-s', '--subdir', default='', dest='subdir', help='Subdirectory of the new target (only for the "add_target" action)')
tgt_parser.add_argument('--type', dest='tgt_type', choices=rewriter_keys['target']['target_type'][2], default='executable',
help='Type of the target to add (only for the "add_target" action)')
@@ -64,13 +64,13 @@ def add_arguments(parser, formatter=None):
kw_parser.add_argument('kwargs', nargs='*', help='Pairs of keyword and value')
# Default options
- def_parser = subparsers.add_parser('default-options', help='Modify the project default options', formatter_class=formatter)
+ def_parser = subparsers.add_parser('default-options', aliases=['def'], help='Modify the project default options', formatter_class=formatter)
def_parser.add_argument('operation', choices=rewriter_keys['default_options']['operation'][2],
help='Action to execute')
def_parser.add_argument('options', nargs='*', help='Key, value pairs of configuration option')
# JSON file/command
- cmd_parser = subparsers.add_parser('command', help='Execute a JSON array of commands', formatter_class=formatter)
+ cmd_parser = subparsers.add_parser('command', aliases=['cmd'], help='Execute a JSON array of commands', formatter_class=formatter)
cmd_parser.add_argument('json', help='JSON string or file to execute')
class RequiredKeys: