mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 15:14:44 +00:00
docs: Update example prompt in fish_prompt docs
This used `whoami` and `hostname` and lacked spaces. [ci skip]
This commit is contained in:
parent
558dd6e53d
commit
17157b3516
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue