2024-03-05 17:57:16 -05:00
|
|
|
# See "Title options" in README.md for configuration options
|
2015-10-27 22:05:01 +04:00
|
|
|
|
2017-01-19 10:18:56 -08: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" ]
|
2026-05-14 23:27:16 -04:00
|
|
|
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 ]
|
2023-12-18 20:09:53 +04:00
|
|
|
status current-command
|
2016-03-29 23:28:25 -07:00
|
|
|
|
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
|
2015-10-13 14:08:06 -07:00
|
|
|
end
|