{"record":{"id":"538a0c111ffce306","repo":"charmbracelet/vhs","slug":"unknown-setting-literal","errorCode":null,"errorMessage":"Unknown setting: ${literal}","messagePattern":"Unknown setting: (.+?)","errorType":"validation","errorClass":"parser.Error","httpStatus":null,"severity":"error","filePath":"parser/parser.go","lineNumber":450,"sourceCode":"\t\t}\n\t}\n\n\tcmd.Args = p.peek.Literal\n\tp.nextToken()\n\treturn cmd\n}\n\n// parseSet parses a set command.\n// A set command takes a setting name and a value.\n//\n//\tSet <setting> <value>\nfunc (p *Parser) parseSet() Command {\n\tcmd := Command{Type: token.SET}\n\n\tif token.IsSetting(p.peek.Type) {\n\t\tcmd.Options = p.peek.Literal\n\t} else {\n\t\tp.errors = append(p.errors, NewError(p.peek, \"Unknown setting: \"+p.peek.Literal))\n\t}\n\tp.nextToken()\n\n\tswitch p.cur.Type {\n\tcase token.WAIT_TIMEOUT:\n\t\tcmd.Args = p.parseTime()\n\tcase token.WAIT_PATTERN:\n\t\tcmd.Args = p.peek.Literal\n\t\t_, err := regexp.Compile(p.peek.Literal)\n\t\tif err != nil {\n\t\t\tp.errors = append(p.errors, NewError(p.peek, \"Invalid regexp pattern: \"+p.peek.Literal))\n\t\t}\n\t\tp.nextToken()\n\tcase token.LOOP_OFFSET:\n\t\tcmd.Args = p.peek.Literal\n\t\tp.nextToken()\n\t\t// Allow LoopOffset without '%'\n\t\t// Set LoopOffset 20","sourceCodeStart":432,"sourceCodeEnd":468,"githubUrl":"https://github.com/charmbracelet/vhs/blob/c073383b5de0b1f57bf514113029c306bc986539/parser/parser.go#L432-L468","documentation":"Fires in parseSet when the first argument after Set is not a recognized setting token (token.IsSetting fails). The value after an unknown name is still consumed, but cmd.Options is left empty and the error is recorded. It is a generic whitelist guard over the supported setting names.","triggerScenarios":"Thrown at parser/parser.go:450 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a supported setting name such as TypingSpeed, WaitTimeout, WaitPattern, LoopOffset, WindowBar, MarginFill or CursorBlink","Check spelling and casing of the setting name","Remove the Set line if the setting does not exist in this vhs version"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c073383b5de0b1f57bf514113029c306bc986539","analyzedAt":"2026-09-02T01:53:05.682Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}