(commands: string[])
| 491 | } |
| 492 | |
| 493 | function generateFishCompletion(commands: string[]): string { |
| 494 | const blockTypes = FILTERABLE_BLOCK_TYPES.join(' ') |
| 495 | |
| 496 | // Build the command completions |
| 497 | const commandCompletions = commands |
| 498 | .map(cmd => `complete -c deepnote -n __fish_use_subcommand -a ${cmd} -d '${fishCommandDescriptions[cmd] ?? cmd}'`) |
| 499 | .concat("complete -c deepnote -n __fish_use_subcommand -a help -d 'Display help for command'") |
| 500 | .join('\n') |
| 501 | |
| 502 | // Build the help subcommand completions |
| 503 | const helpCommands = commands.join(' ') |
| 504 | |
| 505 | return `# Fish completion for deepnote CLI |
| 506 | # Save to ~/.config/fish/completions/deepnote.fish |
| 507 | |
| 508 | # Disable file completions by default |
| 509 | complete -c deepnote -f |
| 510 | |
| 511 | # Global options |
| 512 | complete -c deepnote -l help -s h -d 'Display help information' |
| 513 | complete -c deepnote -l version -s v -d 'Display the CLI version' |
| 514 | complete -c deepnote -l no-color -d 'Disable colored output' |
| 515 | complete -c deepnote -l debug -d 'Show debug information' |
| 516 | complete -c deepnote -l quiet -s q -d 'Suppress non-essential output' |
| 517 | |
| 518 | # Commands |
| 519 | ${commandCompletions} |
| 520 | |
| 521 | # inspect subcommand |
| 522 | complete -c deepnote -n '__fish_seen_subcommand_from inspect' -s o -l output -d 'Output format' -xa 'json toon llm' |
| 523 | complete -c deepnote -n '__fish_seen_subcommand_from inspect' -F -a '*.deepnote' |
| 524 | |
| 525 | # cat subcommand |
| 526 | complete -c deepnote -n '__fish_seen_subcommand_from cat' -s o -l output -d 'Output format' -xa 'json llm' |
| 527 | complete -c deepnote -n '__fish_seen_subcommand_from cat' -l notebook -d 'Show only blocks from specified notebook' |
| 528 | complete -c deepnote -n '__fish_seen_subcommand_from cat' -l type -d 'Filter blocks by type' -xa '${blockTypes}' |
| 529 | complete -c deepnote -n '__fish_seen_subcommand_from cat' -l tree -d 'Show structure only without block content' |
| 530 | complete -c deepnote -n '__fish_seen_subcommand_from cat' -F -a '*.deepnote' |
| 531 | |
| 532 | # run subcommand |
| 533 | complete -c deepnote -n '__fish_seen_subcommand_from run' -l python -d 'Path to Python interpreter' |
| 534 | complete -c deepnote -n '__fish_seen_subcommand_from run' -l cwd -d 'Working directory for execution' |
| 535 | complete -c deepnote -n '__fish_seen_subcommand_from run' -l notebook -d 'Run only the specified notebook' |
| 536 | complete -c deepnote -n '__fish_seen_subcommand_from run' -l block -d 'Run only the specified block' |
| 537 | complete -c deepnote -n '__fish_seen_subcommand_from run' -s i -l input -d 'Set input variable value (can be repeated)' |
| 538 | complete -c deepnote -n '__fish_seen_subcommand_from run' -l list-inputs -d 'List all input variables without running' |
| 539 | complete -c deepnote -n '__fish_seen_subcommand_from run' -s o -l output -d 'Output format' -xa 'json toon llm' |
| 540 | complete -c deepnote -n '__fish_seen_subcommand_from run' -l dry-run -d 'Show what would be executed without running' |
| 541 | complete -c deepnote -n '__fish_seen_subcommand_from run' -l top -d 'Display resource usage during execution' |
| 542 | complete -c deepnote -n '__fish_seen_subcommand_from run' -l profile -d 'Show per-block timing and memory usage' |
| 543 | complete -c deepnote -n '__fish_seen_subcommand_from run' -l open -d 'Open the project in Deepnote Cloud after successful execution' |
| 544 | complete -c deepnote -n '__fish_seen_subcommand_from run' -F -a '*.deepnote' -a '*.ipynb' -a '*.qmd' -a '*.py' |
| 545 | |
| 546 | # open subcommand |
| 547 | complete -c deepnote -n '__fish_seen_subcommand_from open' -l domain -d 'Deepnote domain' |
| 548 | complete -c deepnote -n '__fish_seen_subcommand_from open' -s o -l output -d 'Output format' -xa 'json llm' |
| 549 | complete -c deepnote -n '__fish_seen_subcommand_from open' -F -a '*.deepnote' |
| 550 |
no outgoing calls
no test coverage detected