mirror of
https://github.com/IlanCosman/tide.git
synced 2024-12-25 13:06:32 +03:00
12 lines
510 B
Fish
12 lines
510 B
Fish
@mesg '-----------context-----------'
|
|
|
|
set -l sourceFile "$__fish_config_dir/functions/_tide_item_context.fish"
|
|
|
|
function _context
|
|
_tide_decolor (_tide_item_context)
|
|
end
|
|
|
|
@test 'None' (set -lx tide_context_always_display false; _context) -z
|
|
@test 'Default' (set -lx tide_context_always_display true; _context ) = $USER'@'$hostname
|
|
@test 'SSH' (set -g SSH_TTY 'true'; _context) = $USER'@'$hostname
|
|
@test 'Root' (_tide_decolor (sudo fish --command="source $sourceFile;_tide_item_context")) = 'root@'$hostname |