mirror of
https://github.com/IlanCosman/tide.git
synced 2024-11-26 19:30:38 +03:00
11 lines
378 B
Fish
11 lines
378 B
Fish
@mesg '-----------context-----------'
|
|
|
|
set -l sourceFile "$__fish_config_dir/functions/_tide_context.fish"
|
|
|
|
function _context
|
|
tide_decolor (_tide_context)
|
|
end
|
|
|
|
@test 'None' (_context) -z
|
|
@test 'SSH' (set -g SSH_TTY 'true'; _context) = $USER'@'(prompt_hostname)' '
|
|
@test 'Root' (tide_decolor (su -c "fish -c 'source $sourceFile;_tide_context'")) = 'root@'(prompt_hostname)' ' |