From ef9e297ee7cec55b3d2ee2eeae63f466206e1a24 Mon Sep 17 00:00:00 2001 From: Christoph Schlosser Date: Fri, 13 Jun 2025 15:59:03 +0200 Subject: Add first dump of fish config files --- fish/functions/fish_title.fish | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 fish/functions/fish_title.fish (limited to 'fish/functions/fish_title.fish') diff --git a/fish/functions/fish_title.fish b/fish/functions/fish_title.fish new file mode 100644 index 0000000..91793c2 --- /dev/null +++ b/fish/functions/fish_title.fish @@ -0,0 +1,30 @@ +# See "Title options" in README.md for configuration options + +function __bobthefish_title_user -S -d 'Display actual user if different from $default_user' + if [ "$theme_title_display_user" = 'yes' ] + if [ "$USER" != "$default_user" -o -n "$SSH_CLIENT" ] + set -l IFS . + uname -n | read -l host __ + echo -ns (whoami) '@' $host ' ' + end + end +end + +function fish_title + __bobthefish_title_user + + if [ "$theme_title_display_process" = 'yes' ] + status current-command + + [ "$theme_title_display_path" != 'no' ] + and echo ' ' + end + + if [ "$theme_title_display_path" != 'no' ] + if [ "$theme_title_use_abbreviated_path" = 'no' ] + echo $PWD + else + prompt_pwd + end + end +end -- cgit v1.2.3