import type { MountRegistry } from '../../../mount/registry.ts'; import type { Session } from '../../../session/session.ts'; import type { BuiltinCall, Result } from '../types.ts'; /** * Run the `type` builtin (`type [-afptP] name [name ...]`). * * Resolution matches `command -V`, but the exit rule is `type`'s: 0 only * when every name resolves. `-t` prints the classification word, * `-p`/`-P` print a path (always empty here) and are one mutually * exclusive group with `-t`, `-a` prints one line per layer holding the * name (a shell function shadowing an installed CLI is the case that has * two), `-f` ignores the function table, and a missing name warns on * stderr unless a word-only mode (`-t`/`-p`) is active. */ export declare function handleType(args: readonly string[], session: Session, registry: MountRegistry): Result; /** * Run the `which` builtin (`which [-as] name [name ...]`). * * Pinned against debianutils `which` (debian:stable-slim): a miss prints * nothing at all, the exit status is 0 only when every name resolves (1 * with no operands), and `-s` reports through the status alone. Two * deliberate divergences, both forced by mirage having no PATH: the * printed word is the name rather than a path (as `command -v` already * does), and every runnable resolves, where GNU reports only files * (`which cd` misses there, since a builtin is not on the PATH; here * everything is in-process, so reporting nothing would make the command * useless). Keywords stay unresolvable, as they are not commands * anywhere. `-a` prints one line per layer, so a shadowed name prints * its name twice; `type -a` is the surface that names the layers. The * refusal for an unknown option is bash's shape, not the C tool's * `Illegal option`, because this is a builtin and the usage line cannot * honestly name `/usr/bin/which`. */ export declare function handleWhich(args: readonly string[], session: Session, registry: MountRegistry): Result; /** The `type` arm. */ export declare function typeBuiltin(call: BuiltinCall): Promise; /** The `which` arm. */ export declare function whichBuiltin(call: BuiltinCall): Promise; //# sourceMappingURL=lookup.d.ts.map