mirror of
https://git.in.rschanz.org/ryan77627/guix-config.git
synced 2024-11-07 16:56:09 -05:00
15 lines
475 B
Fish
15 lines
475 B
Fish
|
function _tide_item_context
|
||
|
if set -q SSH_TTY
|
||
|
set -fx tide_context_color $tide_context_color_ssh
|
||
|
else if test "$EUID" = 0
|
||
|
set -fx tide_context_color $tide_context_color_root
|
||
|
else if test "$tide_context_always_display" = true
|
||
|
set -fx tide_context_color $tide_context_color_default
|
||
|
else
|
||
|
return
|
||
|
end
|
||
|
|
||
|
string match -qr "^(?<h>(\.?[^\.]*){0,$tide_context_hostname_parts})" @$hostname
|
||
|
_tide_print_item context $USER$h
|
||
|
end
|