Built-in Commands
XShell ships with 27 built-in commands that work identically on Windows, macOS, and Linux.
They are implemented in xshell/core/builtins.py and are always
available — no PATH lookup needed.
Quick reference
| Category | Commands |
|---|---|
| Navigation | cd, pwd, ls, dir |
| Files | cat, touch, mkdir, rm, cp, mv |
| Output | echo |
| Terminal | clear, cls |
| History | history |
| Aliases | alias, unalias |
| Environment | export, unset, env |
| Shell mgmt | source, exit, quit |
| Discovery | which, type, help |
| Theming | theme |
| Plugins | plugin |
Pipeline operators
These are not commands — they're syntax handled by the parser:
| Operator | Meaning |
|---|---|
| | Pipe stdout of left into stdin of right |
> | Redirect stdout to file (overwrite) |
>> | Redirect stdout to file (append) |
< | Redirect stdin from file |
&& | Run right only if left succeeded (exit 0) |
|| | Run right only if left failed (exit ≠ 0) |
; | Run both regardless of exit code |
& | Run in background |
# Examples
ls | grep .py > results.txt
make && echo "Build OK" || echo "Build failed"
long_job &
Exit codes
Every command returns an integer exit code. 0 means success, anything else is an error.
$? is not yet a shell variable in XShell — the exit code is shown in the status bar of
the web terminal.