mirror of
https://github.com/oh-my-fish/theme-bobthefish.git
synced 2024-10-27 20:34:23 +00:00
Display user in terminal title
This commit is contained in:
parent
48f067bac0
commit
551a768534
@ -398,7 +398,7 @@ function __bobthefish_prompt_status -S -a last_status -d 'Display symbols for a
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function __bobthefish_prompt_user -S -d 'Display actual user if different from $default_user'
|
function __bobthefish_prompt_user -S -d 'Display actual user if different from $default_user in a prompt segment'
|
||||||
if [ "$theme_display_user" = 'yes' ]
|
if [ "$theme_display_user" = 'yes' ]
|
||||||
if [ "$USER" != "$default_user" -o -n "$SSH_CLIENT" ]
|
if [ "$USER" != "$default_user" -o -n "$SSH_CLIENT" ]
|
||||||
__bobthefish_start_segment $__color_username
|
__bobthefish_start_segment $__color_username
|
||||||
|
@ -3,7 +3,19 @@
|
|||||||
# set -g theme_title_display_path no
|
# set -g theme_title_display_path no
|
||||||
# set -g theme_title_use_abbreviated_path no
|
# set -g theme_title_use_abbreviated_path no
|
||||||
|
|
||||||
|
function __bobthefish_user -S -d 'Display actual user if different from $default_user'
|
||||||
|
if [ "$theme_display_user" = 'yes' ]
|
||||||
|
if [ "$USER" != "$default_user" -o -n "$SSH_CLIENT" ]
|
||||||
|
set -l IFS .
|
||||||
|
hostname | read -l hostname __
|
||||||
|
echo -ns (whoami) '@' $hostname ' '
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function fish_title
|
function fish_title
|
||||||
|
__bobthefish_user
|
||||||
|
|
||||||
if [ "$theme_title_display_process" = 'yes' ]
|
if [ "$theme_title_display_process" = 'yes' ]
|
||||||
echo $_
|
echo $_
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user