Include user in prompt if not the normal user
This commit is contained in:
parent
bdfce892e4
commit
cb958c0da3
4 changed files with 17 additions and 4 deletions
|
@ -21,7 +21,8 @@ function fish_prompt --description 'Write out the prompt'
|
|||
(set_color $fish_color_vcs_braces)")"
|
||||
end
|
||||
|
||||
echo -n -s (set_color $fish_color_host) (prompt_hostname) ' ' \
|
||||
(set_color $fish_color_cwd) (prompt_pwd) (string join '' $vcs) \
|
||||
(set_color $fish_color_suffix) $suffix (set_color normal) ' '
|
||||
echo -n -s (set_color $fish_color_host) (prompt_user) (prompt_hostname) \
|
||||
' ' (set_color $fish_color_cwd) (prompt_pwd) \
|
||||
(string join '' $vcs) (set_color $fish_color_suffix) $suffix \
|
||||
(set_color normal) ' '
|
||||
end
|
||||
|
|
5
fish/functions/prompt_user.fish
Normal file
5
fish/functions/prompt_user.fish
Normal file
|
@ -0,0 +1,5 @@
|
|||
function prompt_user
|
||||
if test (whoami) != "$fish_normal_user"
|
||||
echo (whoami)"@"
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue