Initial commit
This commit is contained in:
commit
be4c358070
89 changed files with 2766 additions and 0 deletions
15
fish/functions/_tide_item_context.fish
Normal file
15
fish/functions/_tide_item_context.fish
Normal file
|
@ -0,0 +1,15 @@
|
|||
function _tide_item_context
|
||||
if set -q SSH_TTY
|
||||
set -lx tide_context_color $tide_context_color_ssh
|
||||
test "$tide_context_hostname_parts" = 0 && _tide_print_item context $USER ||
|
||||
h=(string split . $hostname) _tide_print_item context $USER@(string join . $h[..$tide_context_hostname_parts])
|
||||
else if test "$EUID" = 0
|
||||
set -lx tide_context_color $tide_context_color_root
|
||||
test "$tide_context_hostname_parts" = 0 && _tide_print_item context $USER ||
|
||||
h=(string split . $hostname) _tide_print_item context $USER@(string join . $h[..$tide_context_hostname_parts])
|
||||
else if test "$tide_context_always_display" = true
|
||||
set -lx tide_context_color $tide_context_color_default
|
||||
test "$tide_context_hostname_parts" = 0 && _tide_print_item context $USER ||
|
||||
h=(string split . $hostname) _tide_print_item context $USER@(string join . $h[..$tide_context_hostname_parts])
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue