In src/executor.rs line 87, there is a TODO: get type without fully parsing the arg. Currently, the type builtin converts an Arg back into a Command via the From<&Arg> impl in src/arg.rs, which calls parse_command() and triggers a full PATH traversal.
This is wasteful and couples type to the parser's internals. Refactor to use a lighter lookup that checks builtin names and PATH without constructing a full Command.
Acceptance criteria:
In
src/executor.rsline 87, there is aTODO: get type without fully parsing the arg. Currently, thetypebuiltin converts anArgback into aCommandvia theFrom<&Arg>impl insrc/arg.rs, which callsparse_command()and triggers a full PATH traversal.This is wasteful and couples
typeto the parser's internals. Refactor to use a lighter lookup that checks builtin names and PATH without constructing a fullCommand.Acceptance criteria:
typeno longer round-trips throughparse_command()typeis efficient (no unnecessary iteration)TODOcomment is resolvedtypetests continue to pass