Skip to content

Instantly share code, notes, and snippets.

@deseven
Last active December 27, 2019 00:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deseven/273e3283fe6c95a799d7d96669f1e14f to your computer and use it in GitHub Desktop.
Save deseven/273e3283fe6c95a799d7d96669f1e14f to your computer and use it in GitHub Desktop.
fish theme used in interService
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