sample prompts: use $USER instead of (whoami)

This commit is contained in:
Aaron Gyes 2019-09-18 23:35:16 -07:00
parent f35e18bb9b
commit b7dd060dec
3 changed files with 6 additions and 6 deletions

View file

@ -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 '

View file

@ -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

View file

@ -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 '@'