fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Nahorcolor: prefer `set_color --reset` over `set_color normal`867946468

master
980 B29 linesraw
1# localization: tier1
2function prompt_login --description "display user name for the prompt"
3    if not set -q __fish_machine
4        set -g __fish_machine
5        set -l debian_chroot $debian_chroot
6
7        if test -r /etc/debian_chroot
8            set debian_chroot (cat /etc/debian_chroot)
9        end
10
11        if set -q debian_chroot[1]
12            and test -n "$debian_chroot"
13            set -g __fish_machine "(chroot:$debian_chroot)"
14        end
15    end
16
17    # Prepend the chroot environment if present
18    if set -q __fish_machine[1]
19        echo -n -s (set_color yellow) "$__fish_machine" (set_color --reset) ' '
20    end
21
22    # If we're running via SSH, change the host color.
23    set -l color_host $fish_color_host
24    if set -q SSH_TTY; and set -q fish_color_host_remote
25        set color_host $fish_color_host_remote
26    end
27
28    echo -n -s (set_color $fish_color_user) "$USER" (set_color --reset) @ (set_color $color_host) (prompt_hostname) (set_color --reset)
29end