tide/tests/context.fish

11 lines
376 B
Fish
Raw Normal View History

2020-05-10 01:38:07 +03:00
@mesg '-----------context-----------'
2020-05-22 00:58:09 +03:00
set -l sourceFile "$__fish_config_dir/functions/_tide_item_context.fish"
2020-05-09 08:48:35 +03:00
function _context
2020-05-22 00:58:09 +03:00
_tide_decolor (_tide_item_context)
2020-05-09 08:48:35 +03:00
end
@test 'None' (_context) -z
2020-05-26 07:23:13 +03:00
@test 'SSH' (set -g SSH_TTY 'true'; _context) = $USER'@'$hostname' '
@test 'Root' (_tide_decolor (sudo fish -c "source $sourceFile;_tide_item_context")) = 'root@'$hostname' '