diff --git a/src/cleo/commands/completions_command.py b/src/cleo/commands/completions_command.py index 7d67fa0a..5117e4d3 100644 --- a/src/cleo/commands/completions_command.py +++ b/src/cleo/commands/completions_command.py @@ -164,7 +164,7 @@ def render_bash(self) -> str: for opt in sorted(cmd.definition.options, key=lambda o: o.name) ) cmds_opts += [ - f" ({command_name})", + f" {command_name})", f' opts="${{opts}} {options}"', " ;;", "", # newline diff --git a/tests/commands/completion/fixtures/bash.txt b/tests/commands/completion/fixtures/bash.txt index b42714e1..4165dd42 100644 --- a/tests/commands/completion/fixtures/bash.txt +++ b/tests/commands/completion/fixtures/bash.txt @@ -25,23 +25,23 @@ _my_function() case "$com" in - (command:with:colons) + command:with:colons) opts="${opts} --goodbye" ;; - (hello) + hello) opts="${opts} --dangerous-option --option-without-description" ;; - (help) + help) opts="${opts} " ;; - (list) + list) opts="${opts} " ;; - ('spaced command') + 'spaced command') opts="${opts} " ;;