Created
September 29, 2025 06:57
-
-
Save furudean/922d6599329845a46935b79e12af0b23 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if ! set -q prompt_symbol | |
| set -g prompt_symbol "→" | |
| end | |
| if ! set -q prompt_symbol_color | |
| set -g prompt_symbol_color normal | |
| end | |
| function fish_prompt | |
| set -l last_status $status | |
| set -l stat | |
| if contains -- --final-rendering $argv | |
| set stat (set_color --dim)(prompt_pwd)(set_color normal) | |
| else | |
| set stat (set_color $fish_color_cwd)(prompt_pwd -D 999)(set_color normal) | |
| end | |
| set -l error | |
| if test $last_status -ne 0 | |
| set error (set_color $fish_color_error)"[$last_status]"(set_color normal) | |
| end | |
| set -l symbol (set_color $prompt_symbol_color)$prompt_symbol(set_color normal) | |
| if contains -- --final-rendering $argv | |
| string join ' ' -- $base $stat $symbol '' | |
| return | |
| else | |
| echo '' | |
| echo $stat | |
| string join ' ' -- $error $symbol '' | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment