2015-10-27 18:05:01 +00:00
|
|
|
# You can override some default title options in your config.fish:
|
|
|
|
# set -g theme_title_display_process no
|
|
|
|
# set -g theme_title_display_path no
|
2017-01-19 18:18:56 +00:00
|
|
|
# set -g theme_title_display_user yes
|
2015-10-27 18:05:01 +00:00
|
|
|
# set -g theme_title_use_abbreviated_path no
|
|
|
|
|
2017-01-19 18:18:56 +00:00
|
|
|
function __bobthefish_title_user -S -d 'Display actual user if different from $default_user'
|
2019-01-13 17:56:20 +00:00
|
|
|
if [ "$theme_title_display_user" = 'yes' ]
|
|
|
|
if [ "$USER" != "$default_user" -o -n "$SSH_CLIENT" ]
|
|
|
|
set -l IFS .
|
2023-03-26 14:22:17 +00:00
|
|
|
uname -n | read -l host __
|
|
|
|
echo -ns (whoami) '@' $host ' '
|
2019-01-13 17:56:20 +00:00
|
|
|
end
|
2017-01-09 23:55:09 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2013-09-18 06:17:15 +00:00
|
|
|
function fish_title
|
2019-01-13 17:56:20 +00:00
|
|
|
__bobthefish_title_user
|
2017-01-09 23:55:09 +00:00
|
|
|
|
2019-01-13 17:56:20 +00:00
|
|
|
if [ "$theme_title_display_process" = 'yes' ]
|
|
|
|
echo $_
|
2016-03-30 06:28:25 +00:00
|
|
|
|
2019-01-13 17:56:20 +00:00
|
|
|
[ "$theme_title_display_path" != 'no' ]
|
|
|
|
and echo ' '
|
|
|
|
end
|
2015-10-27 18:05:01 +00:00
|
|
|
|
2019-01-13 17:56:20 +00:00
|
|
|
if [ "$theme_title_display_path" != 'no' ]
|
|
|
|
if [ "$theme_title_use_abbreviated_path" = 'no' ]
|
|
|
|
echo $PWD
|
|
|
|
else
|
|
|
|
prompt_pwd
|
|
|
|
end
|
2015-10-27 18:05:01 +00:00
|
|
|
end
|
2015-10-13 21:08:06 +00:00
|
|
|
end
|