mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 02:12:08 +08: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
|
@ -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 New Issue
Block a user