mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00:00
sample prompts: use $USER instead of (whoami)
This commit is contained in:
parent
f35e18bb9b
commit
b7dd060dec
3 changed files with 6 additions and 6 deletions
|
@ -7,7 +7,7 @@ function fish_prompt
|
|||
set -g VIRTUAL_ENV_DISABLE_PROMPT true
|
||||
end
|
||||
set_color yellow
|
||||
printf '%s' (whoami)
|
||||
printf '%s' $USER
|
||||
set_color normal
|
||||
printf ' at '
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# name: Screen Savvy
|
||||
# author: Matthias
|
||||
function fish_prompt -d "Write out the prompt"
|
||||
if test -z $WINDOW
|
||||
printf '%s%s@%s%s%s%s%s> ' (set_color yellow) (whoami) (set_color purple) (prompt_hostname) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
|
||||
function fish_prompt -d "Screen Savvy prompt"
|
||||
if test -z "$WINDOW"
|
||||
printf '%s%s@%s%s%s%s%s> ' (set_color yellow) $USER (set_color purple) (prompt_hostname) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
|
||||
else
|
||||
printf '%s%s@%s%s%s(%s)%s%s%s> ' (set_color yellow) (whoami) (set_color purple) (prompt_hostname) (set_color white) (echo $WINDOW) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
|
||||
printf '%s%s@%s%s%s(%s)%s%s%s> ' (set_color yellow) $USER (set_color purple) (prompt_hostname) (set_color white) (echo $WINDOW) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,7 +6,7 @@ function fish_prompt --description 'Write out the prompt'
|
|||
|
||||
# User
|
||||
set_color $fish_color_user
|
||||
echo -n (whoami)
|
||||
echo -n $USER
|
||||
set_color normal
|
||||
|
||||
echo -n '@'
|
||||
|
|
Loading…
Reference in a new issue