You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
784 B
Fish

# Defined in /home/anton/.config/fish/functions/fish_prompt.fish @ line 1
function fish_prompt
set -l git_branch (git branch ^/dev/null | sed -n '/\* /s///p')
if test -n "$git_branch" -a (pwd) != /home/anton
set git_branch " [$git_branch]"
else
set git_branch ""
end
if test -n "$IN_NIX_SHELL"
set_color cyan
echo -n "nix "
set_color normal
end
# set_color cyan
echo -n (whoami)
set_color normal
echo -n '@'
# set_color bryellow
echo -n (hostname)
if status is-interactive-job-control; and test (jobs | wc -l) -gt 0
set_color cyan
echo -n " #"(jobs | wc -l)
end
set_color yellow
echo -n "$git_branch"
set_color green
echo -n ' '(prompt_pwd)
set_color normal
echo ' > '
end