{"record":{"id":"4217ed21e575adc4","repo":"kovidgoyal/kitty","slug":"the-kitty-command-line-is-incomplete","errorCode":null,"errorMessage":"The kitty command line is incomplete","messagePattern":"The kitty command line is incomplete","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"kitty/entry_points.py","lineNumber":106,"sourceCode":"def run_kitten(args: list[str]) -> None:\n    try:\n        kitten = args[1]\n    except IndexError:\n        from kittens.runner import list_kittens\n\n        list_kittens()\n        raise SystemExit(1)\n    sys.argv = args[1:]\n    from kittens.runner import run_kitten as rk\n\n    rk(kitten)\n\n\ndef namespaced(args: list[str]) -> None:\n    try:\n        func = namespaced_entry_points[args[1]]\n    except IndexError:\n        raise SystemExit('The kitty command line is incomplete')\n    except KeyError:\n        pass\n    else:\n        func(args[1:])\n        return\n    raise SystemExit(f'{args[1]} is not a known entry point. Choices are: ' + ', '.join(namespaced_entry_points))\n\n\nentry_points = {\n    # These two are here for backwards compat\n    'icat': icat,\n    'list-fonts': list_fonts,\n    '+': namespaced,\n}\nnamespaced_entry_points = {k: v for k, v in entry_points.items() if k[0] not in '+@'}\nnamespaced_entry_points['hold'] = hold\nnamespaced_entry_points['complete'] = complete\nnamespaced_entry_points['runpy'] = runpy","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/entry_points.py#L88-L124","documentation":"kitty dispatches subcommands via a namespaced entry-point table (namespaced_entry_points in kitty/entry_points.py). When `kitty <namespace>` is run with no subcommand at all, args[1] lookup raises IndexError and kitty exits with 'The kitty command line is incomplete'.","triggerScenarios":"Running `kitty +<namespace>` style invocation where only the namespace token is present, e.g. `kitty icat` with no further argument when the handler expects one, or `kitten`-style dispatch with args length 1.","commonSituations":"Shell scripts or aliases that truncate arguments; empty \"$@\" expansion in a wrapper script; typo that drops the subcommand after the namespace.","solutions":["Supply the intended subcommand/arguments after the namespace.","Inspect your alias/script to confirm arguments are actually passed (quote \"$@\").","Run kitty with no args to list valid entry points if unsure of names."],"exampleFix":"# before\nkitty +open   # missing target\n# after\nkitty +open file.txt","handlingStrategy":"validation","validationCode":"if len(args) < 2:\n    raise SystemExit('usage: kitty <namespace> <subcommand> [args...]')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Quote \"$@\" in wrapper scripts so empty expansions are visible.","Dry-run wrappers with echo before executing."],"tags":["kitty","cli","argument-missing"],"backgroundTag":"missing-cli-argument","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}