Skip to content

Instantly share code, notes, and snippets.

@damiankloip
Created September 20, 2015 13:05
Show Gist options
  • Save damiankloip/00c2a9c7484c0144034d to your computer and use it in GitHub Desktop.
Save damiankloip/00c2a9c7484c0144034d to your computer and use it in GitHub Desktop.
function fish_prompt --description 'Write out the prompt'
set -l last_status $status
if not set -q __fish_prompt_normal
set -g __fish_prompt_normal (set_color normal)
end
#USER/HOST
printf '%s@%s ' $USER (hostname -s)
# PWD
set_color $fish_color_cwd
echo -n (prompt_pwd)
set_color normal
printf '%s' (__fish_git_prompt)
if not test $last_status -eq 0
set_color $fish_color_error
end
echo -n '$ '
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment