{"record":{"id":"de095ae4db0beb5e","repo":"yorukot/superfile","slug":"unexpected-openchar-v-in-tokenization","errorCode":null,"errorMessage":"unexpected openChar %v in tokenization","messagePattern":"unexpected openChar (.+?) in tokenization","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/internal/ui/prompt/tokenize.go","lineNumber":87,"sourceCode":"\t\t// Might Handle values being too big, or having multiple lines\n\t\t// But this is based on user input, so it is probably okay for now\n\t\t// Same comment for command substitution\n\t\tresCommand.WriteString(value)\n\tcase '(':\n\t\tretCode, output, err := utils.ExecuteCommandInShell(subCmdTimeout, cwdLocation, token)\n\n\t\tif retCode == -1 {\n\t\t\treturn fmt.Errorf(\"could not execute shell substitution command : %s : %w\", token, err)\n\t\t}\n\t\t// We are allowing commands that exit with non zero status code\n\t\t// We still use its output\n\t\tif retCode != 0 {\n\t\t\tslog.Debug(\"substitution command exited with non zero status\", \"retCode\", retCode,\n\t\t\t\t\"command\", token)\n\t\t}\n\t\tresCommand.WriteString(output)\n\tdefault:\n\t\treturn fmt.Errorf(\"unexpected openChar %v in tokenization\", openChar)\n\t}\n\treturn nil\n}\n\nfunc findEndingBracket(r []rune, openIdx int, openParan rune, closeParan rune) int {\n\tif openIdx < 0 || openIdx >= len(r) || r[openIdx] != openParan {\n\t\treturn -1\n\t}\n\n\topenCount := 1\n\ti := openIdx + 1\n\tfor i < len(r) && openCount != 0 {\n\t\tswitch r[i] {\n\t\tcase openParan:\n\t\t\topenCount++\n\t\tcase closeParan:\n\t\t\topenCount--\n\t\t}","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/yorukot/superfile/blob/b72f550bc6e75913f48eb49fdd258e1a2df2fe88/src/internal/ui/prompt/tokenize.go#L69-L105","documentation":"Error \"unexpected openChar %v in tokenization\" thrown in yorukot/superfile.","triggerScenarios":"Thrown at src/internal/ui/prompt/tokenize.go:87 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b72f550bc6e75913f48eb49fdd258e1a2df2fe88","analyzedAt":"2026-09-01T04:38:08.254Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}