diff options
| -rw-r--r-- | mesonbuild/coredata.py | 1 | ||||
| -rw-r--r-- | mesonbuild/mcompile.py | 2 | ||||
| -rw-r--r-- | mesonbuild/mconf.py | 2 | ||||
| -rw-r--r-- | mesonbuild/mdevenv.py | 2 | ||||
| -rw-r--r-- | mesonbuild/mdist.py | 2 | ||||
| -rw-r--r-- | mesonbuild/minit.py | 2 | ||||
| -rw-r--r-- | mesonbuild/minstall.py | 2 | ||||
| -rw-r--r-- | mesonbuild/mintro.py | 2 | ||||
| -rw-r--r-- | mesonbuild/msetup.py | 2 | ||||
| -rwxr-xr-x | mesonbuild/msubprojects.py | 2 | ||||
| -rw-r--r-- | mesonbuild/mtest.py | 2 | ||||
| -rw-r--r-- | mesonbuild/munstable_coredata.py | 2 | ||||
| -rw-r--r-- | mesonbuild/rewriter.py | 2 | ||||
| -rwxr-xr-x | mesonbuild/scripts/env2mfile.py | 2 | ||||
| -rw-r--r-- | mesonbuild/wrap/wraptool.py | 2 |
15 files changed, 29 insertions, 0 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py index 29a3d0eec..4fd82833e 100644 --- a/mesonbuild/coredata.py +++ b/mesonbuild/coredata.py @@ -1332,6 +1332,7 @@ class BuiltinOption(T.Generic[_T, _U]): # Update `docs/markdown/Builtin-options.md` after changing the options below # Also update mesonlib._BUILTIN_NAMES. See the comment there for why this is required. +# Please also update completion scripts in $MESONSRC/data/shell-completions/ BUILTIN_DIR_OPTIONS: 'MutableKeyedOptionDictType' = OrderedDict([ (OptionKey('prefix'), BuiltinOption(UserStringOption, 'Installation prefix', default_prefix())), (OptionKey('bindir'), BuiltinOption(UserStringOption, 'Executable directory', 'bin')), diff --git a/mesonbuild/mcompile.py b/mesonbuild/mcompile.py index 6721beb0b..60d71333b 100644 --- a/mesonbuild/mcompile.py +++ b/mesonbuild/mcompile.py @@ -301,6 +301,8 @@ def get_parsed_args_xcode(options: 'argparse.Namespace', builddir: Path) -> T.Tu cmd += options.xcode_args return cmd, None +# Note: when adding arguments, please also add them to the completion +# scripts in $MESONSRC/data/shell-completions/ def add_arguments(parser: 'argparse.ArgumentParser') -> None: """Add compile specific arguments.""" parser.add_argument( diff --git a/mesonbuild/mconf.py b/mesonbuild/mconf.py index 9f6c6856f..04f6d5bcb 100644 --- a/mesonbuild/mconf.py +++ b/mesonbuild/mconf.py @@ -35,6 +35,8 @@ if T.TYPE_CHECKING: # cannot be TV_Loggable, because non-ansidecorators do direct string concat LOGLINE = T.Union[str, mlog.AnsiDecorator] +# Note: when adding arguments, please also add them to the completion +# scripts in $MESONSRC/data/shell-completions/ def add_arguments(parser: 'argparse.ArgumentParser') -> None: coredata.register_builtin_arguments(parser) parser.add_argument('builddir', nargs='?', default='.') diff --git a/mesonbuild/mdevenv.py b/mesonbuild/mdevenv.py index aea5da2e0..b60d7a572 100644 --- a/mesonbuild/mdevenv.py +++ b/mesonbuild/mdevenv.py @@ -18,6 +18,8 @@ if T.TYPE_CHECKING: POWERSHELL_EXES = {'pwsh.exe', 'powershell.exe'} +# Note: when adding arguments, please also add them to the completion +# scripts in $MESONSRC/data/shell-completions/ def add_arguments(parser: argparse.ArgumentParser) -> None: parser.add_argument('-C', dest='builddir', type=Path, default='.', help='Path to build directory') diff --git a/mesonbuild/mdist.py b/mesonbuild/mdist.py index 089056b35..c46670e0c 100644 --- a/mesonbuild/mdist.py +++ b/mesonbuild/mdist.py @@ -48,6 +48,8 @@ archive_extension = {'gztar': '.tar.gz', 'xztar': '.tar.xz', 'zip': '.zip'} +# Note: when adding arguments, please also add them to the completion +# scripts in $MESONSRC/data/shell-completions/ def add_arguments(parser: argparse.ArgumentParser) -> None: parser.add_argument('-C', dest='wd', action=RealPathAction, help='directory to cd into before running') diff --git a/mesonbuild/minit.py b/mesonbuild/minit.py index abe8104d0..39027fd11 100644 --- a/mesonbuild/minit.py +++ b/mesonbuild/minit.py @@ -153,6 +153,8 @@ def autodetect_options(options: Arguments, sample: bool = False) -> None: raise SystemExit("Can't autodetect language, please specify it with -l.") print("Detected language: " + options.language) +# Note: when adding arguments, please also add them to the completion +# scripts in $MESONSRC/data/shell-completions/ def add_arguments(parser: 'argparse.ArgumentParser') -> None: ''' Here we add args for that the user can passed when making a new diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py index 5f8629b7f..bf6f7a120 100644 --- a/mesonbuild/minstall.py +++ b/mesonbuild/minstall.py @@ -72,6 +72,8 @@ false to copy the link.''' selinux_updates: T.List[str] = [] +# Note: when adding arguments, please also add them to the completion +# scripts in $MESONSRC/data/shell-completions/ def add_arguments(parser: argparse.ArgumentParser) -> None: parser.add_argument('-C', dest='wd', action=RealPathAction, help='directory to cd into before running') diff --git a/mesonbuild/mintro.py b/mesonbuild/mintro.py index e3f2e51b1..a980c7c55 100644 --- a/mesonbuild/mintro.py +++ b/mesonbuild/mintro.py @@ -90,6 +90,8 @@ def get_meson_introspection_types(coredata: T.Optional[cdata.CoreData] = None, ('tests', IntroCommand('List all unit tests', func=lambda: list_tests(testdata))), ]) +# Note: when adding arguments, please also add them to the completion +# scripts in $MESONSRC/data/shell-completions/ def add_arguments(parser: argparse.ArgumentParser) -> None: intro_types = get_meson_introspection_types() for key, val in intro_types.items(): diff --git a/mesonbuild/msetup.py b/mesonbuild/msetup.py index 4ff60000f..f8e242ae2 100644 --- a/mesonbuild/msetup.py +++ b/mesonbuild/msetup.py @@ -31,6 +31,8 @@ syntax: glob ''' +# Note: when adding arguments, please also add them to the completion +# scripts in $MESONSRC/data/shell-completions/ def add_arguments(parser: argparse.ArgumentParser) -> None: coredata.register_builtin_arguments(parser) parser.add_argument('--native-file', diff --git a/mesonbuild/msubprojects.py b/mesonbuild/msubprojects.py index fb9a84713..ea2eb2cc3 100755 --- a/mesonbuild/msubprojects.py +++ b/mesonbuild/msubprojects.py @@ -657,6 +657,8 @@ def add_wrap_update_parser(subparsers: 'SubParsers') -> argparse.ArgumentParser: p.set_defaults(pre_func=Runner.pre_update_wrapdb) return p +# Note: when adding arguments, please also add them to the completion +# scripts in $MESONSRC/data/shell-completions/ def add_arguments(parser: argparse.ArgumentParser) -> None: subparsers = parser.add_subparsers(title='Commands', dest='command') subparsers.required = True diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py index 57bf28fb6..c1ce1e09e 100644 --- a/mesonbuild/mtest.py +++ b/mesonbuild/mtest.py @@ -124,6 +124,8 @@ def determine_worker_count() -> int: num_workers = 1 return num_workers +# Note: when adding arguments, please also add them to the completion +# scripts in $MESONSRC/data/shell-completions/ def add_arguments(parser: argparse.ArgumentParser) -> None: parser.add_argument('--maxfail', default=0, type=int, help='Number of failing tests before aborting the ' diff --git a/mesonbuild/munstable_coredata.py b/mesonbuild/munstable_coredata.py index e6c543b81..ba6ffb3eb 100644 --- a/mesonbuild/munstable_coredata.py +++ b/mesonbuild/munstable_coredata.py @@ -21,6 +21,8 @@ import os.path import pprint import textwrap +# Note: when adding arguments, please also add them to the completion +# scripts in $MESONSRC/data/shell-completions/ def add_arguments(parser): parser.add_argument('--all', action='store_true', dest='all', default=False, help='Show data not used by current backend.') diff --git a/mesonbuild/rewriter.py b/mesonbuild/rewriter.py index a86b97ecc..d6509fc97 100644 --- a/mesonbuild/rewriter.py +++ b/mesonbuild/rewriter.py @@ -38,6 +38,8 @@ if T.TYPE_CHECKING: class RewriterException(MesonException): pass +# Note: when adding arguments, please also add them to the completion +# scripts in $MESONSRC/data/shell-completions/ def add_arguments(parser, formatter=None): parser.add_argument('-s', '--sourcedir', type=str, default='.', metavar='SRCDIR', help='Path to source directory.') parser.add_argument('-V', '--verbose', action='store_true', default=False, help='Enable verbose output') diff --git a/mesonbuild/scripts/env2mfile.py b/mesonbuild/scripts/env2mfile.py index 1a6d0ce97..8811b6cf8 100755 --- a/mesonbuild/scripts/env2mfile.py +++ b/mesonbuild/scripts/env2mfile.py @@ -31,6 +31,8 @@ def has_for_build() -> bool: return True return False +# Note: when adding arguments, please also add them to the completion +# scripts in $MESONSRC/data/shell-completions/ def add_arguments(parser: 'argparse.ArgumentParser') -> None: parser.add_argument('--debarch', default=None, help='The dpkg architecture to generate.') diff --git a/mesonbuild/wrap/wraptool.py b/mesonbuild/wrap/wraptool.py index c009aa1c6..c4ff9dbbb 100644 --- a/mesonbuild/wrap/wraptool.py +++ b/mesonbuild/wrap/wraptool.py @@ -28,6 +28,8 @@ from .. import mesonlib, msubprojects if T.TYPE_CHECKING: import argparse +# Note: when adding arguments, please also add them to the completion +# scripts in $MESONSRC/data/shell-completions/ def add_arguments(parser: 'argparse.ArgumentParser') -> None: subparsers = parser.add_subparsers(title='Commands', dest='command') subparsers.required = True |
