You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

22 lines
495B

  1. # target format: user@host:~$
  2. function fish_prompt --description 'prompt'
  3. set -l color_cwd
  4. set -l suffix
  5. switch $USER
  6. case root toor
  7. if set -q fish_color_cwd_root
  8. set color_cwd $fish_color_cwd_root
  9. else
  10. set color_cwd $fish_color_cwd
  11. end
  12. set suffix '#'
  13. case '*'
  14. set color_cwd $fish_color_cwd
  15. set suffix '>'
  16. end
  17. set -g fish_prompt_pwd_dir_length 0
  18. echo -n -s "$USER" @ "$__fish_prompt_hostname" : (set_color $color_cwd) (prompt_pwd) (set_color normal) " $suffix "
  19. end