Skip to content

Commit c81407b

Browse files
authored
CM-48457 - Fix Homebrew completions (#310)
1 parent 7d83fba commit c81407b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

cycode/cli/app.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import typer
55
from typer import rich_utils
66
from typer._completion_classes import completion_init
7+
from typer._completion_shared import Shells
78
from typer.completion import install_callback, show_callback
89

910
from cycode import __version__
@@ -113,16 +114,17 @@ def app_callback(
113114
),
114115
] = False,
115116
__: Annotated[
116-
Optional[bool],
117+
Shells, # the choice is required for Homebrew to be able to install the completion
117118
typer.Option(
118119
'--show-completion',
119120
callback=show_callback,
120121
is_eager=True,
121122
expose_value=False,
122-
help='Show completion for the current shell, to copy it or customize the installation.',
123+
show_default=False,
124+
help='Show completion for the specified shell, to copy it or customize the installation.',
123125
rich_help_panel=_COMPLETION_RICH_HELP_PANEL,
124126
),
125-
] = False,
127+
] = None,
126128
) -> None:
127129
"""[bold cyan]Cycode CLI - Command Line Interface for Cycode.[/]"""
128130
init_sentry()

0 commit comments

Comments
 (0)