I don't think it's part of the terminal emulator (e.g. xterm, gnome-terminal) but the shell (bash, zsh, etc.). You're correct that it's not something that's implemented as an external program though; the "current directory" is state for a currently running terminal session, so changing that state is done via the shell interface (either directly by built-in commands like cd or indirectly via external commands that use those transitively).
Note: Child processes can't change the working directory of the parent. An external command (that is, not a shell builtin, shell function, or externally loaded module) cannot change the working directory, because they're launched as child processes.
True, I meant the shell, as `cd` is a shell builtin. However, `git-checkout` does implement this behavior. `git checkout -` will checkout the previously checked out branch.
saghm|1 year ago
machinestops|1 year ago
model-15-DAV|1 year ago