we lose aliases in the help output but this does fix shell completion, which is more important.

fixes #3
This commit is contained in:
2026-02-07 05:20:37 +00:00
parent 34067ca61d
commit 9693d4f913
19 changed files with 180 additions and 141 deletions

View File

@@ -7,10 +7,9 @@ from rich.table import Table
from rich.text import Text
from obsws_cli import console, util, validate
from obsws_cli.alias import SubTyperAliasGroup
from obsws_cli.protocols import DataclassProtocol
app = typer.Typer(cls=SubTyperAliasGroup)
app = typer.Typer()
@app.callback()
@@ -18,7 +17,8 @@ def main():
"""Control groups in OBS scenes."""
@app.command('list | ls')
@app.command('list')
@app.command('ls', hidden=True)
def list_(
ctx: typer.Context,
scene_name: Annotated[
@@ -84,7 +84,8 @@ def _get_group(group_name: str, resp: DataclassProtocol) -> dict | None:
return group
@app.command('show | sh')
@app.command('show')
@app.command('sh', hidden=True)
def show(
ctx: typer.Context,
scene_name: Annotated[
@@ -117,7 +118,8 @@ def show(
console.out.print(f'Group {console.highlight(ctx, group_name)} is now visible.')
@app.command('hide | h')
@app.command('hide')
@app.command('h', hidden=True)
def hide(
ctx: typer.Context,
scene_name: Annotated[
@@ -150,7 +152,8 @@ def hide(
console.out.print(f'Group {console.highlight(ctx, group_name)} is now hidden.')
@app.command('toggle | tg')
@app.command('toggle')
@app.command('tg', hidden=True)
def toggle(
ctx: typer.Context,
scene_name: Annotated[
@@ -187,7 +190,8 @@ def toggle(
console.out.print(f'Group {console.highlight(ctx, group_name)} is now hidden.')
@app.command('status | ss')
@app.command('status')
@app.command('ss', hidden=True)
def status(
ctx: typer.Context,
scene_name: Annotated[