diff --git a/README.md b/README.md index 01ae051..3307b99 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,8 @@ mud --diverged git pull | `mud complete-branch-all` | prints unique local and remote branch names across repositories for shell completion. | | `mud tags`/`mud t` | displays git tags in repositories. | +`--` format is also supported. An example would be `mud -- git status`. + ### Flags `mud ` will execute a bash command across all repositories. diff --git a/src/mud/app.py b/src/mud/app.py index 441798b..4e59a23 100644 --- a/src/mud/app.py +++ b/src/mud/app.py @@ -233,6 +233,11 @@ def _filter_with_arguments(self) -> None: index = 1 while index < len(sys.argv): arg = sys.argv[index] + # Support '-- command' style: treat everything after '--' as the command + if arg == '--': + self.command = ' '.join(sys.argv[index+1:]) + del sys.argv[index:] + break if not arg.startswith('-'): break if any(arg.startswith(prefix) for prefix in LABEL_PREFIX):