Terminal And SSH Prompt Standard¶
v1.0 | Build 001.20261002.191221Z
Standard for Terminal and SSH prompt behavior in the McGuckin.Net environment.
Planned publication: docs.mcguckin.net
Status: Draft
Purpose¶
Provide a consistent prompt that makes the current machine, privilege level, and exact working path visible before every command.
Standard layout¶
The prompt uses two lines:
or:
When elevated privileges are active, the first line includes a root marker:
The first line answers where the command is running. The second line shows the exact directory affected by the command.
Color vocabulary¶
Colors use explicit RGB values rather than terminal theme names. This keeps the appearance consistent across Ghostty, macOS Terminal, and remote shells.
| Element | RGB | Meaning |
|---|---|---|
[LOCAL] |
#00C853 green |
The command is running on the Mac itself. |
[REMOTE] |
#FF8C00 orange |
The command is running through SSH on another host. |
[ROOT] |
#FF1744 red |
The current account has root or administrator privileges. |
| Hostname | Terminal default | The machine identity. |
| Full path | Terminal default | The exact directory affected by the command. |
| Prompt symbol | Terminal default | The command-entry marker. |
| Git branch | Optional purple | Repository context. |
| Git changes | Optional yellow | Uncommitted repository changes. |
| Warning marker | Optional gray | A condition requiring attention. |
Only state markers are colored by default. The hostname, path, brackets, and prompt symbol remain in the terminal's default color.
Examples¶
Local Mac:
Remote Ubuntu host:
Remote root session:
Remote repository with changes:
Platform implementation¶
macOS¶
The Mac prompt is implemented in /Users/todd/.zshrc and uses Zsh true-color escapes:
#00C853for[LOCAL]#FF8C00for[REMOTE]#FF1744reserved for[ROOT]
Unix SSH hosts¶
Each Unix host requires its own Bash or Zsh configuration. The Mac prompt does not propagate over SSH. The standard has been deployed to gateway, jukebox, ubuntu, and arcade.
Windows¶
Windows Command Prompt uses its own PROMPT environment variable and a Windows line-break token. The two-line layout is:
True-color rendering depends on the terminal's Windows ANSI/VT support. The prompt layout and host/path identity remain available even when the terminal does not render RGB escapes.
Batocera¶
Batocera is managed through its own system image and shell. The standard prompt can be placed in its persistent shell configuration after access is available.
Batocera provides these update commands:
batocera-check-updates checks the configured Stable branch. The butterfly argument checks the development branch. batocera-upgrade applies the checked update.
Current rollout¶
| Host | Status |
|---|---|
| ToddsMacStudio | Configured and tested |
| gateway | Configured and tested |
| jukebox | Configured and tested |
| ubuntu | Configured and tested |
| windows | Two-line prompt configured; key access verified; RGB rendering depends on Command Prompt/VT support |
| arcade | Key installed; prompt configuration deployed |
| haos | Pending console access |
Internal DNS names¶
The gateway's UniFi DNS records provide these internal A records:
| Name | Address |
|---|---|
ubuntu.mcguckin.net |
10.10.10.151 |
windows.mcguckin.net |
10.10.10.131 |
The SSH shortcuts are ubuntu and windows; the numeric IP addresses are not used in the user-facing SSH configuration.
Maintenance rules¶
- Keep the first line for execution context and privilege state.
- Keep the second line for the full path and prompt symbol.
- Use explicit RGB values for colored states.
- Do not rely on a terminal theme's interpretation of
green,red, oryellow. - Test a fresh interactive session on every host after changing the prompt.
Document Control¶
| Field | Value |
|---|---|
| Control ID | NET-INF-005 |
| Lifecycle | PUB |
| Status | Published |
| Version | v1.0 |
| Build | 001.20261002.191221Z |
| Canonical Filename | NET-INF-005_PUB_terminal-ssh-prompt-standard_001-20261002-191221Z.md |
| Prior Identity | none |