Skip to content

rulvar API reference


rulvar API reference / @rulvar/rulvar / lexShellCommand

Function: lexShellCommand()

ts
function lexShellCommand(command): ShellSegment[];

Defined in: packages/core/dist/index.d.ts

Lexes a command into segments per the matching algorithm above. Quotes and escapes are honored; nothing is expanded; $(, backticks, <(, >(, and << (outside single quotes) poison their segment.

Parameters

ParameterType
commandstring

Returns

ShellSegment[]