Last active
December 27, 2019 00:18
-
-
Save deseven/273e3283fe6c95a799d7d96669f1e14f to your computer and use it in GitHub Desktop.
fish theme used in interService
This file contains 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
function fish_prompt --description 'Write out the prompt' | |
set laststatus $status | |
if not set -q __fish_prompt_hostname | |
set -g __fish_prompt_hostname (hostname) | |
end | |
set_color -b black | |
if test $laststatus -eq 0 | |
#printf "[%s$status%s] " (set_color -o green) (set_color normal) | |
else | |
printf "[%s$status%s] " (set_color -o red) (set_color normal) | |
end | |
printf '%s%s%s%s%s%s%s%s%s%s%s%s%s' (set_color white) '' (set_color yellow) $__fish_prompt_hostname (set_color white) ':' (set_color green) (echo $PWD | sed -e "s|^$HOME|~|") (set_color white) '' (set_color white) | |
set_color normal | |
if test (id -u) -eq 0 | |
echo "# " | |
else | |
echo "\$ " | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment