Skip to content

Instantly share code, notes, and snippets.

@suzuki86
Created July 19, 2018 03:40
Show Gist options
  • Save suzuki86/7e22af4acb238901b2c0c6166b44befc to your computer and use it in GitHub Desktop.
Save suzuki86/7e22af4acb238901b2c0c6166b44befc to your computer and use it in GitHub Desktop.
~/.config/fish/functions/fish_prompt.fish
function fish_prompt --description 'Write out the prompt'
set -l last_status $status
set -g fish_prompt_pwd_dir_length 0
set_color magenta
echo -n (date '+%Y-%m-%d %H:%I:%S')
echo -n ' '
# User
set_color $fish_color_user
echo -n (whoami)
set_color normal
echo -n '@'
# Host
set_color $fish_color_host
echo -n (prompt_hostname)
set_color normal
echo -n ':'
# PWD
set_color $fish_color_cwd
echo -n (prompt_pwd)
set_color normal
__fish_git_prompt
echo
echo -n '> '
set_color normal
end
function fish_right_prompt
echo
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment