This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Prompt
Zwei Varianten, je nachdem ob Starship installiert ist:
- Mit Starship (optionale Komponente, siehe
Dotfiles-CLI): dieselbe Config (config/starship/starship.toml) für Zsh und PowerShell – ersetzt beide handgeschriebenen Fallback-Prompts, sobald installiert. - Ohne Starship: handgeschriebener Fallback-Prompt (separat für Zsh und PowerShell), funktional ähnlich, aber ohne Git-Status.
Starship-Aufbau
Format: Username@Hostname Verzeichnis Git-Branch Git-Status Prompt-Zeichen
| Segment | Zeigt | Besonderheit |
|---|---|---|
$username |
Aktueller Benutzername | Immer sichtbar (show_always). Blau normal, rot wenn root (effektive UID 0 – eine echte OS-Prüfung, nicht nur $USER) |
$hostname |
Rechnername | Immer sichtbar (ssh_only = false), auch lokal – nicht nur über SSH |
$directory |
Aktuelles Verzeichnis | Auf 1 Ebene gekürzt (truncation_length = 1), zeigt also z.B. dotfiles statt ~/Repos/dotfiles |
$git_branch |
Aktueller Branch (nur in Git-Repos) | Symbol davor |
$git_status |
Uncommitted Changes / Ahead-Behind | Nur sichtbar, wenn tatsächlich etwas ansteht |
$character |
Prompt-Zeichen | ❯ grün bei Erfolg, rot beim letzten Fehler-Exitcode, ❮ gelb im Vim-Normal-Modus (vicmd) |
Root-Indikator: läuft die Shell mit UID 0 (z.B. nach sudo -i), wird $username rot statt blau – deutlich sichtbarer Hinweis, dass man gerade als root unterwegs ist. Funktioniert nur, wenn root selbst diese Dotfiles hat (siehe scripts/setup-root.sh, wird im Post-Setup optional angeboten).
Fallback-Prompt (Zsh, ohne Starship)
Format: user@hostname ~/pfad %
- Blau normal, rot als root (
%(!...)-Ternary, testet auf UID 0). - Kein Git-Status (dafür bräuchte es Starship oder ein eigenes Zsh-Plugin).
- Farben kommen aus derselben Catppuccin-Mocha-Palette wie der Rest.
Fallback-Prompt (PowerShell, ohne Starship)
Format: user@hostname pfad >
- Cyan normal, rot +
#-Prompt-Zeichen als Administrator (IsInRole(Administrator)-Prüfung – Windows-Pendant zum Unix-Root-Indikator). - Ebenfalls kein Git-Status.
Vim-Modus-Indikator
Nur mit Starship: das Prompt-Zeichen wechselt zu ❮ (gelb), sobald du dich im Zsh-Normal-Modus befindest (nach Esc, siehe Zsh, über vimcmd_symbol). Der Fallback-Prompt zeigt das nicht an – dort bleibt das Prompt-Zeichen in beiden Modi gleich.