parsing/expandcmd

    Dark Mode
Search:
Group by:

Types

MatchResult = enum
  AmbiguousMatch, NoMatches, MatchFound
Match = ref object
  case kind*: MatchResult
  of MatchFound:
      command*: string

  of AmbiguousMatch:
      possibilities*: seq[string]

  else:
    nil
  

Procs

proc resolve(argList: openArray[string]; command: string): Match {...}{.raises: [],
    tags: [].}
Expand command to an element within argList, if possible.