configs  Check-in [46ef6bc803]

Overview
Comment:fish_prompt: Redirect fossil's stderr to /dev/null
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 46ef6bc803ce9a085fdc1be405bb7692942451b8294012cc7d8b1a345eada88e
User & Date: js 2020-05-25 20:32:31
Context
2020-05-26
20:05
zshrc: Check if --color is supported by ls & grep check-in: 34edc39a9a user: js tags: trunk
2020-05-25
20:32
fish_prompt: Redirect fossil's stderr to /dev/null check-in: 46ef6bc803 user: js tags: trunk
2020-05-24
20:51
Add Fossil branch to fish prompt check-in: aed8907a52 user: js tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to fish/functions/fish_prompt.fish.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function fish_prompt --description 'Write out the prompt'
    set -l suffix
    switch "$USER"
        case root toor
            set suffix (set_color $fish_color_cwd_root)'#'
        case '*'
            set suffix '>'
    end

    set -l branch (git symbolic-ref HEAD 2>/dev/null)
    set branch (string replace -r "^refs/heads/" "" $branch)
    
    if test -z "$branch"
        set branch (fossil branch current)
    end

    set -l vcs
    if test -n "$branch"
        set vcs (set_color $fish_color_vcs_braces)"(" \
                (set_color $fish_color_vcs)"$branch" \
                (set_color $fish_color_vcs_braces)")"













|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function fish_prompt --description 'Write out the prompt'
    set -l suffix
    switch "$USER"
        case root toor
            set suffix (set_color $fish_color_cwd_root)'#'
        case '*'
            set suffix '>'
    end

    set -l branch (git symbolic-ref HEAD 2>/dev/null)
    set branch (string replace -r "^refs/heads/" "" $branch)
    
    if test -z "$branch"
        set branch (fossil branch current 2>/dev/null)
    end

    set -l vcs
    if test -n "$branch"
        set vcs (set_color $fish_color_vcs_braces)"(" \
                (set_color $fish_color_vcs)"$branch" \
                (set_color $fish_color_vcs_braces)")"