Files
oh-my-fish_theme-bobthefish/functions/fish_title.fish

33 lines
859 B
Fish
Raw Normal View History

# See "Title options" in README.md for configuration options
2015-10-27 22:05:01 +04:00
function __bobthefish_title_user -S -d 'Display actual user if different from $default_user'
2026-05-14 23:21:23 -04:00
if [ "$theme_title_display_user" = yes ]
2019-01-13 09:56:20 -08:00
if [ "$USER" != "$default_user" -o -n "$SSH_CLIENT" ]
set -l host (string split . -- (uname -n))[1]
[ -n "$USER" ]
and echo -ns $USER
or echo -ns (whoami)
echo -ns '@' $host ' '
2019-01-13 09:56:20 -08:00
end
2017-01-10 00:55:09 +01:00
end
end
2013-09-17 23:17:15 -07:00
function fish_title
2019-01-13 09:56:20 -08:00
__bobthefish_title_user
2017-01-10 00:55:09 +01:00
2026-05-14 23:21:23 -04:00
if [ "$theme_title_display_process" = yes ]
status current-command
2026-05-14 23:21:23 -04:00
[ "$theme_title_display_path" != no ]
2019-01-13 09:56:20 -08:00
and echo ' '
end
2015-10-27 22:05:01 +04:00
2026-05-14 23:21:23 -04:00
if [ "$theme_title_display_path" != no ]
if [ "$theme_title_use_abbreviated_path" = no ]
2019-01-13 09:56:20 -08:00
echo $PWD
else
prompt_pwd
end
2015-10-27 22:05:01 +04:00
end
end