@carlwr/zsh-lexicon
    Preparing search index...

    Function resolve

    • Resolve a raw user-code token against the lexicon: direct lexicon-key lookup (trimmed raw as the key, never lossy), then the category's resolver — lexicon-aware parsing such as option's no_-stripping and -J/+J flags, or redirections decomposed into group-op + tail; most categories add nothing to the direct step.

      Direct precedence is load-bearing for template-key categories, where the literal key and a live token resolved through templates must not collide: job_spec %number vs %5 → %number, history_expn !n vs !42, special_function TRAPZERR vs TRAPINT → TRAPNAL. Non-template categories miss the direct step and resolve (AUTO_CD → autocd).

      The sole public brand-boundary crossing for untrusted raw strings; the other route to an identity is lexicon iteration.

      Type Parameters

      • K extends
            | "option"
            | "conditional_op"
            | "builtin"
            | "precmd_modifier"
            | "special_param"
            | "complex_command"
            | "reserved_word"
            | "redirection"
            | "process_subst"
            | "param_expn"
            | "subscript_flag"
            | "param_expn_flag"
            | "history_expn"
            | "glob_op"
            | "glob_flag"
            | "glob_qualifier"
            | "prompt_escape"
            | "zle_widget"
            | "keymap"
            | "job_spec"
            | "arith_op"
            | "mathfunc"
            | "special_function"
            | "comp_utility"

      Parameters

      Returns ResolvedHit<K> | undefined