6tp.fish 659 B

123456789101112131415161718192021222324252627282930313233343536
  1. function fish_prompt --description 'Write out the prompt'
  2. set -l last_status $status
  3. set -l is_in_git `git rev-parse --is-inside-work-tree`
  4. # User
  5. set_color $fish_color_user
  6. echo -n (whoami)
  7. set_color normal
  8. echo -n '@'
  9. # Host
  10. set_color $fish_color_host
  11. echo -n (prompt_hostname)
  12. set_color normal
  13. echo -n ':'
  14. # PWD
  15. set_color $fish_color_cwd
  16. echo -n (prompt_pwd)
  17. set_color normal
  18. echo is_in_git# for tiny screen
  19. __terlar_git_prompt
  20. __fish_hg_prompt
  21. echo
  22. if not test $last_status -eq 0
  23. set_color $fish_color_error
  24. end
  25. echo -n '➤ '
  26. set_color normal
  27. end