pub async fn cd(ctx: CommandContext) -> CommandResultExpand description
Execute the cd command
Mirrors POSIX sh/bash semantics so that shell scripts translate directly:
cd-> change to $HOME (or $USERPROFILE on Windows)cd ~/cd ~/x-> tilde expands to $HOMEcd --> change to $OLDPWD and print the new directory (like sh)cd <dir>-> change to(relative paths resolve against the current working directory, or the cwdoption)
This low-level command API retains its original process-mutating behavior.
ProcessRunner and Pipeline use resolve_cd instead so their cwd and
environment remain invocation-local.