Files
2026-11-17 09:28:47 +01:00

37 lines
997 B
Fish
Raw Permalink Blame History

This file contains ambiguous Unicode characters
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.
function fish_prompt
set -l last_status $status
set -l normal (set_color $theme_normal)
set -l dim (set_color $theme_muted)
set -l accent (set_color $theme_accent)
set -l red (set_color $theme_danger)
set -l green (set_color $theme_success)
# Erste Zeile: ╭─ [user@host] ~/pfad on branch
echo -n "$dim╭─$normal"
if set -q SSH_CONNECTION
echo -n " $dim$USER@"(prompt_hostname)"$normal"
end
echo -n " $accent"(prompt_pwd)$normal
if command -q git
set -l branch (command git symbolic-ref --short HEAD 2>/dev/null)
if test -z "$branch"
set branch (command git rev-parse --short HEAD 2>/dev/null)
end
if test -n "$branch"
echo -n " $dim"on"$normal $green$branch$normal"
end
end
echo
# Zweite Zeile: ╰─❯
if test $last_status -ne 0
echo -n "$dim╰─$red❯$normal "
else
echo -n "$dim╰─$accent❯$normal "
end
end