Add Docker install, drop yazi, harden installer TERM handling

Replace the Docker-aliases-only component with a full install_docker step:
docker.io via apt, systemd enable, docker group membership, and aliases.
Remove yazi from core packages, terminal configs, aliases, and the repo.

Harden install.sh for SSH clients (e.g. Ghostty) that forward unknown TERM
values: fall back through xterm-256color, xterm, screen, dumb, and use
safe_clear in the interactive menu.

Document Ghostty/SSH terminal issues in README, including bash vs zsh ssh()
wrappers and verification steps.
This commit is contained in:
2026-06-04 22:23:03 +02:00
parent 6fe8529d10
commit 41a7eb370b
4 changed files with 111 additions and 36 deletions

View File

@@ -17,11 +17,11 @@ cd ~/server_cli_tools
| # | Component | What it does |
|---|-----------|-------------|
| 1 | **Core packages** | `vim`, `bat`, `eza`, `fzf`, `htop`, `tmux`, `zsh`, `ripgrep`, `fd-find`, `zoxide`, `yazi`, `git-delta` |
| 1 | **Core packages** | `vim`, `bat`, `eza`, `fzf`, `htop`, `tmux`, `zsh`, `ripgrep`, `fd-find`, `zoxide`, `git-delta` |
| 2 | **Zsh + Oh-My-Zsh** | Shell, plugins (`zsh-autosuggestions`, `zsh-syntax-highlighting`, `z`), custom prompt theme |
| 3 | **Aliases + tools** | General, git, and docker aliases with a self-documenting help system (`h`) |
| 4 | **Terminal configs** | `bat` theme (base16), `yazi` file manager config |
| 5 | **Docker aliases** | Start/stop toggle, bulk stop/remove, image management |
| 4 | **Terminal configs** | `bat` theme (base16) |
| 5 | **Docker** | `docker.io` via apt, service enabled, user added to `docker` group, management aliases |
| 6 | **Git config** | `git-delta` as pager with side-by-side diffs |
## Alias highlights
@@ -63,7 +63,6 @@ server_cli_tools/
custom_tools/
backup_dotfiles.sh # backup conflicting dotfiles
bat/config # bat theme
yazi/yazi.toml # yazi file manager config
zsh/zhann-elvis.zsh-theme # custom zsh prompt (git-aware)
zshrc # .zshrc with oh-my-zsh + plugins
```
@@ -76,3 +75,67 @@ After installation, create local overrides that won't be tracked:
- `~/.config/aliases/.custom_aliases` — temporary/personal aliases
Use `ea l` to edit local aliases, `ea c` for custom, `sa` to re-source.
## Troubleshooting
### Terminal type / colors over SSH
Clients such as [Ghostty](https://ghostty.org/) set `TERM` to values like `xterm-ghostty`. SSH forwards that to the server, but the server usually has no matching terminfo entry. Symptoms include:
- `'xterm-ghostty': unknown terminal type` when running `./install.sh` (the interactive menu calls `clear`)
- Broken or missing colors in `vim`, `htop`, `tmux`, and other TUI programs
`install.sh` detects an unknown `TERM` at startup and falls back to the first available of `xterm-256color`, `xterm`, `screen`, or `dumb`. You can also use the non-interactive installer: `./install.sh --all`.
For **all future SSH sessions** to any server, force a portable `TERM` on the client before connecting. Add a wrapper on your **local** machine (not the server). The function body is the same in bash and zsh; what differs is where you put it and how you check that it took effect.
**Bash** (`~/.bashrc`) — append at the end of the file:
```bash
unalias ssh 2>/dev/null
ssh() {
TERM=xterm-256color command ssh "$@"
}
```
**Zsh** (`~/.zshrc`) — append at the end, *after* Oh-My-Zsh and other plugins so nothing loads later and overrides it:
```zsh
unalias ssh 2>/dev/null
ssh() {
TERM=xterm-256color command ssh "$@"
}
```
Zsh also allows `function ssh { ... }` with the same body; `ssh() { ... }` is equivalent. In both shells, `command ssh` calls the real binary and avoids recursion.
| | Bash | Zsh |
|---|------|-----|
| Config file | `~/.bashrc` | `~/.zshrc` |
| Placement | End of file | End of file, after OMZ/plugins |
| Clear alias first | `unalias ssh` (if present) | Same — plugins sometimes define `ssh` aliases |
| Argument forwarding | `"$@"` | `"$@"` — not `"@"` |
| Reload | `exec bash` or new terminal | `exec zsh` or new terminal |
| Check wrapper is active | `type ssh` | `whence -v ssh` (`type` can be ambiguous in zsh) |
Verify:
```sh
# bash
type ssh
ssh myhost 'echo $TERM'
# zsh
whence -v ssh
ssh myhost 'echo $TERM'
```
Both should report a shell function and print `xterm-256color` on the remote host.
One-off:
```sh
TERM=xterm-256color ./install.sh
```
Optional: in `~/.ssh/config`, `SetEnv TERM=xterm-256color` under `Host *` only works when the remote `sshd` accepts `TERM` via `AcceptEnv` — many servers do not, so the shell wrapper above is more reliable.