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.

17 lines
389B

  1. function fish_title
  2. # Just calculate this once, to save a few cycles when displaying the prompt
  3. if not set -q __fish_prompt_hostname
  4. set -g __fish_prompt_hostname (hostname|cut -d . -f 1)
  5. end
  6. set -l suffix
  7. switch $USER
  8. case root toor
  9. set suffix '#'
  10. case '*'
  11. set suffix '>'
  12. end
  13. echo -n -s "$USER" @ "$__fish_prompt_hostname" : (prompt_pwd) " $suffix $_"
  14. end