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."
),
),
)
| 2900 | |
| 2901 | @app.command("w", rich_help_panel="Shortcuts") |
| 2902 | def watch_abbrev( |
| 2903 | path: str = typer.Argument(".", help="Path to watch"), |
| 2904 | context: Optional[str] = typer.Option(None, "--context", "-c", help="Specific context to use"), |
| 2905 | poll: bool = typer.Option( |
| 2906 | False, |
| 2907 | "--poll", |
| 2908 | help="Use watchdog's polling observer for Docker bind mounts and network filesystems.", |
| 2909 | ), |
| 2910 | sync_on_start: bool = typer.Option( |
| 2911 | False, |
| 2912 | "--sync-on-start", |
| 2913 | help=( |
| 2914 | "Synchronize already-indexed files before watching. " |
| 2915 | "Defaults off; use 'cgc index --force' for a full re-index." |
| 2916 | ), |
| 2917 | ), |
| 2918 | ): |
| 2919 | """Shortcut for 'cgc watch'""" |
| 2920 | watch(path, context=context, poll=poll, sync_on_start=sync_on_start) |
| 2921 | |
| 2922 | |
| 2923 | # ============================================================================ |