Shortcut for 'cgc watch
(
path: str = typer.Argument(".", help="Path to watch"),
context: Optional[str] = typer.Option(None, "--context", "-c", help="Specific context to use"),
poll: bool = typer.Option(
False,
"--poll",
help="Use watchdog's polling observer for Docker bind mounts and network filesystems.",
),
sync_on_start: bool = typer.Option(
False,
"--sync-on-start",
help=(
"Synchronize already-indexed files before watching. "
"Defaults off; use 'cgc index --force' for a full re-index."
),
),
)
| 3093 | |
| 3094 | @app.command("w", rich_help_panel="Shortcuts") |
| 3095 | def watch_abbrev( |
| 3096 | path: str = typer.Argument(".", help="Path to watch"), |
| 3097 | context: Optional[str] = typer.Option(None, "--context", "-c", help="Specific context to use"), |
| 3098 | poll: bool = typer.Option( |
| 3099 | False, |
| 3100 | "--poll", |
| 3101 | help="Use watchdog's polling observer for Docker bind mounts and network filesystems.", |
| 3102 | ), |
| 3103 | sync_on_start: bool = typer.Option( |
| 3104 | False, |
| 3105 | "--sync-on-start", |
| 3106 | help=( |
| 3107 | "Synchronize already-indexed files before watching. " |
| 3108 | "Defaults off; use 'cgc index --force' for a full re-index." |
| 3109 | ), |
| 3110 | ), |
| 3111 | ): |
| 3112 | """Shortcut for 'cgc watch'""" |
| 3113 | watch(path, context=context, poll=poll, sync_on_start=sync_on_start) |
| 3114 | |
| 3115 | |
| 3116 | # ============================================================================ |