Guest User

Untitled

a guest
Jan 17th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. fn print_segment fg string
  2. #echo -n "${fg}${string} ${c::0x888}❯ "
  3. echo -n "${fg}${string} ❯ "
  4. #echo -n "${fg}[ ${string} ]"
  5. #echo -n $string
  6. end
  7.  
  8. fn PROMPT
  9. echo "${c::0x111bg}"
  10.  
  11. print_segment "${c::0x0FF}" $(hostname)
  12. print_segment "${c::0xF0F}" "${USER}"
  13. print_segment "${c::0xFF0}" "${SWD}"
  14.  
  15. let git_branch = $(git rev-parse --abbrev-ref HEAD)
  16. test $git_branch != "" &&
  17. print_segment "${c::0xF80}" "${git_branch}"
  18.  
  19. echo
  20. echo -n "${c::0x888}❯ ${c::0xFFF}"
  21. end
Add Comment
Please, Sign In to add comment