yorukot/superfile · error

unexpected openChar %v in tokenization

Error message

unexpected openChar %v in tokenization

What it means

Error "unexpected openChar %v in tokenization" thrown in yorukot/superfile.

Source

Thrown at src/internal/ui/prompt/tokenize.go:87

		// Might Handle values being too big, or having multiple lines
		// But this is based on user input, so it is probably okay for now
		// Same comment for command substitution
		resCommand.WriteString(value)
	case '(':
		retCode, output, err := utils.ExecuteCommandInShell(subCmdTimeout, cwdLocation, token)

		if retCode == -1 {
			return fmt.Errorf("could not execute shell substitution command : %s : %w", token, err)
		}
		// We are allowing commands that exit with non zero status code
		// We still use its output
		if retCode != 0 {
			slog.Debug("substitution command exited with non zero status", "retCode", retCode,
				"command", token)
		}
		resCommand.WriteString(output)
	default:
		return fmt.Errorf("unexpected openChar %v in tokenization", openChar)
	}
	return nil
}

func findEndingBracket(r []rune, openIdx int, openParan rune, closeParan rune) int {
	if openIdx < 0 || openIdx >= len(r) || r[openIdx] != openParan {
		return -1
	}

	openCount := 1
	i := openIdx + 1
	for i < len(r) && openCount != 0 {
		switch r[i] {
		case openParan:
			openCount++
		case closeParan:
			openCount--
		}

View on GitHub (pinned to b72f550bc6)

When it happens

Trigger: Thrown at src/internal/ui/prompt/tokenize.go:87 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of yorukot/superfile@b72f550bc6 (2026-09-01). Data as JSON: /api/errors/de095ae4db0beb5e. Report an issue: GitHub.