From 17157b3516bc14b05243925a58a4ea09ad1e8886 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Fri, 2 Oct 2020 19:02:10 +0200 Subject: [PATCH] docs: Update example prompt in fish_prompt docs This used `whoami` and `hostname` and lacked spaces. [ci skip] --- doc_src/cmds/fish_prompt.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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