{"record":{"id":"1bb00e5237afb05c","repo":"kovidgoyal/kitty","slug":"too-few-arguments-to-set-colors-function","errorCode":null,"errorMessage":"Too few arguments to set_colors function","messagePattern":"Too few arguments to set_colors function","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"kitty/options/utils.py","lineNumber":342,"sourceCode":"            log_error(f'Invalid move_window specification: {rest}')\n            prest = 0\n    return func, [prest]\n\n\n@func_with_args('pipe')\ndef pipe(func: str, rest: str) -> FuncArgsType:\n    r = list(shlex_split(rest))\n    if len(r) < 3:\n        log_error('Too few arguments to pipe function')\n        r = ['none', 'none', 'true']\n    return func, r\n\n\n@func_with_args('set_colors')\ndef set_colors(func: str, rest: str) -> FuncArgsType:\n    r = list(shlex_split(rest))\n    if len(r) < 1:\n        log_error('Too few arguments to set_colors function')\n    return func, r\n\n\n@func_with_args('remote_control')\ndef remote_control(func: str, rest: str) -> FuncArgsType:\n    func, args = shlex_parse(func, rest)\n    if len(args) < 1:\n        log_error('Too few arguments to remote_control function')\n    return func, args\n\n\n@func_with_args('remote_control_script')\ndef remote_control_script(func: str, rest: str) -> FuncArgsType:\n    func, args = shlex_parse(func, rest)\n    if len(args) < 1:\n        log_error('Too few arguments to remote_control_script function')\n    return func, args\n","sourceCodeStart":324,"sourceCodeEnd":360,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/options/utils.py#L324-L360","documentation":"set_colors got zero arguments after shell-splitting; kitty logs but returns the empty list, making the action a no-op.","triggerScenarios":"`map f1 set_colors` with no argument, or an argument consisting only of whitespace/quotes that shlex splits into nothing.","commonSituations":"Forgetting the theme file or 'None' argument; quoting mistakes that swallow the value.","solutions":["Pass a theme name or color config file, e.g. `map f1 set_colors My Dark` or `map f1 set_colors None` to reset to defaults","Ensure the argument isn't empty after quoting"],"exampleFix":"# before\nmap f1 set_colors\n# after\nmap f1 set_colors Catppuccin-Mocha","handlingStrategy":"validation","validationCode":"import shlex\nok = len(shlex.split('Catppuccin-Mocha')) >= 1","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass a theme name, file, or 'None' to set_colors","Check quotes aren't emptying the argument"],"tags":["kitty","config","colors","parser"],"backgroundTag":"invalid-config-value","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}