fork/fish-shell

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

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

master
523 B23 linesraw
1# name: Simple
2
3function fish_prompt
4    # This is a simple prompt. It looks like
5    # alfa@nobby /path/to/dir $
6    # with the path shortened and colored
7    # and a "#" instead of a "$" when run as root.
8    set -l symbol ' $ '
9    set -l color $fish_color_cwd
10    if fish_is_root_user
11        set symbol ' # '
12        set -q fish_color_cwd_root
13        and set color $fish_color_cwd_root
14    end
15
16    echo -n $USER@$hostname
17
18    set_color $color
19    echo -n (prompt_pwd)
20    set_color --reset
21
22    echo -n $symbol
23end