_pure_prompt_ssh_user.fish 327 B

123456789
  1. function _pure_prompt_ssh_user
  2. set --local username (whoami) # current user name
  3. set --local username_color "$pure_color_ssh_user_normal" # default color
  4. if test "$username" = "root"
  5. set username_color "$pure_color_ssh_user_root" # different color for root
  6. end
  7. echo "$username_color$username"
  8. end