import type { SessionView } from '../../ops/types.ts'; import type { CallStack } from '../../shell/call_stack.ts'; import { PathSpec } from '../../types.ts'; import type { MountRegistry } from '../mount/registry.ts'; import type { Session } from '../session/session.ts'; import type { NamespaceLinks } from '../../ops/config.ts'; import { type ExecuteFn } from './node.ts'; import type { TSNodeLike } from '../../shell/types.ts'; /** * One command's expanded argument vector. * * `expandArgv` is the only place allowed to know that word zero of an * expanded command is its name; every consumer reads named views * instead of slicing word lists. * * `args` and `operands` are two views of the same final word list and * always have equal length; they differ only in element type. Glob * words are resolved by whoever consumes them, exactly once: shell * consumers get shell-resolved words in both views, mount commands * keep pattern PathSpecs for backend pushdown. */ export declare class Argv { /** Expanded command name. */ readonly name: string; /** Text view (what builtins consume). */ readonly args: readonly string[]; /** Classified view (what mount dispatch, test, and ln consume). */ readonly operands: readonly (string | PathSpec)[]; constructor(name: string, args: readonly string[], operands: readonly (string | PathSpec)[]); /** Full classified word list, name included. */ get words(): (string | PathSpec)[]; /** Copy with the classified view replaced (e.g. after symlink rewriting). */ withOperands(operands: readonly (string | PathSpec)[]): Argv; } /** * Expand, classify, and glob-resolve a command's word nodes. * * Uses the cwd mount's CommandSpec (when it has one for the command) to * decide which words are TEXT (skip classification) and which are PATH * (classify even bare filenames). */ export declare function expandArgv(parts: TSNodeLike[], session: Session, executeFn: ExecuteFn, callStack: CallStack | null, registry: MountRegistry, namespace?: NamespaceLinks | null, view?: SessionView): Promise; //# sourceMappingURL=argv.d.ts.map