2020-05-20 20:05:33 +03:00
|
|
|
function _tide_item_context
|
2020-12-26 19:42:21 +03:00
|
|
|
if set -q SSH_TTY
|
2020-05-19 06:03:25 +03:00
|
|
|
set_color $tide_context_ssh_color
|
2020-06-25 05:45:50 +03:00
|
|
|
printf '%s' $USER'@'$hostname
|
2020-05-13 22:46:42 +03:00
|
|
|
else if test $USER = 'root'
|
2020-05-19 06:03:25 +03:00
|
|
|
set_color $tide_context_root_color
|
2020-06-25 05:45:50 +03:00
|
|
|
printf '%s' $USER'@'$hostname
|
2020-12-26 19:42:21 +03:00
|
|
|
else if test "$tide_context_always_display" = 'true'
|
|
|
|
set_color $tide_context_default_color
|
|
|
|
printf '%s' $USER'@'$hostname
|
2020-05-13 22:46:42 +03:00
|
|
|
end
|
|
|
|
end
|