diff --git a/doc_src/cmds/fish_prompt.rst b/doc_src/cmds/fish_prompt.rst index 0e5367f1f..e8df810b7 100644 --- a/doc_src/cmds/fish_prompt.rst +++ b/doc_src/cmds/fish_prompt.rst @@ -33,7 +33,10 @@ A simple prompt: :: function fish_prompt -d "Write out the prompt" - printf '%s@%s%s%s%s> ' (whoami) (hostname | cut -d . -f 1) \ + # This shows up as USER@HOST /home/user/ >, with the directory colored + # $USER and $hostname are set by fish, so you can just use them + # instead of using `whoami` and `hostname` + printf '%s@%s %s%s%s > ' $USER $hostname \ (set_color $fish_color_cwd) (prompt_pwd) (set_color normal) end