diff --git a/kitty/cli.py b/kitty/cli.py index 81883c1bb..45d40f312 100644 --- a/kitty/cli.py +++ b/kitty/cli.py @@ -96,7 +96,9 @@ def opt(text: str) -> str: def option(x: str) -> str: - idx = x.find('-') + idx = x.rfind('--') + if idx < 0: + idx = x.find('-') if idx > -1: x = x[idx:] parts = map(bold, x.split())