#!/usr/bin/env fish # # From official prompt_login.fish of fish function prompt_login --description "display user name for the prompt" set -f color_dark_text $nightfox_bg0 set -f color_venv $nightfox_fg3 set -f color_cwd $fish_color_cwd set -f color_user $fish_color_user if functions -q fish_is_root_user; and fish_is_root_user if set -q fish_color_cwd_root set -f color_cwd $fish_color_cwd_root set -f color_user $fish_color_cwd_root end end if not set -q __fish_machine set -g __fish_machine set -f debian_chroot $debian_chroot if test -r /etc/debian_chroot set -f debian_chroot (cat /etc/debian_chroot) end if set -q debian_chroot[1] and test -n "$debian_chroot" set -g __fish_machine "(chroot:$debian_chroot)" end end # Prepend the chroot environment if present if set -q __fish_machine[1] echo -n -s (set_color -b $fish_color_quote $color_dark_text) "$__fish_machine" (set_color -b $fish_color_user $fish_color_quote)  end # If we're running via SSH, change the host color. set -l color_host $fish_color_host if set -q SSH_TTY; and set -q fish_color_host_remote set -f color_host $fish_color_host_remote end echo -n -s (set_color -b $color_user $color_dark_text) "$USER" echo -n -s (set_color -b $color_host $color_user)  echo -n -s (set_color -b $color_host $color_dark_text) (prompt_hostname) echo -n -s (set_color -b $color_venv $color_host)  end