diff --git a/README.md b/README.md index 73e8d26..06b7117 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,7 @@ set -g theme_display_virtualenv no set -g theme_display_ruby no set -g theme_display_user yes set -g theme_display_hostname yes +set -h theme_display_ssh yes set -g theme_display_vi no set -g theme_display_date no set -g theme_display_cmd_duration yes @@ -119,6 +120,7 @@ set -g theme_newline_cursor yes - `fish_prompt_pwd_dir_length`. bobthefish respects the Fish `$fish_prompt_pwd_dir_length` setting to abbreviate the prompt path. Set to `0` to show the full path, `1` (default) to show only the first character of each parent directory name, or any other number to show up to that many characters. - `theme_project_dir_length`. The same as `$fish_prompt_pwd_dir_length`, but for the path relative to the current project root. Defaults to `0`; set to any other number to show an abbreviated path. - `theme_newline_cursor`. Use `yes` to have cursor start on a new line. By default the prompt is only one line. When working with long directories it may be preferrend to have cursor on the next line. Setting this to `clean` instead of `yes` suppresses the caret on the new line. +- `theme_display_ssh`. Use `no` to hide user- and hostname in ssh-sessions. **Color scheme options** diff --git a/fish_prompt.fish b/fish_prompt.fish index 0d4ccf1..1ea652e 100644 --- a/fish_prompt.fish +++ b/fish_prompt.fish @@ -32,6 +32,7 @@ # set -g theme_display_ruby no # set -g theme_display_user yes # set -g theme_display_hostname yes +# set -g theme_display_ssh yes # set -g theme_display_vi no # set -g theme_avoid_ambiguous_glyphs yes # set -g theme_powerline_fonts no @@ -536,9 +537,9 @@ end # ============================== function __bobthefish_prompt_user -S -d 'Display current user and hostname' - [ "$theme_display_user" = 'yes' -o -n "$SSH_CLIENT" -o \( -n "$default_user" -a "$USER" != "$default_user" \) ] + [ "$theme_display_user" = 'yes' -o \( "$theme_display_ssh" = 'yes' -a -n "$SSH_CLIENT" \) -o \( -n "$default_user" -a "$USER" != "$default_user" \) ] and set -l display_user - [ "$theme_display_hostname" = 'yes' -o -n "$SSH_CLIENT" ] + [ "$theme_display_hostname" = 'yes' -o \( "$theme_display_ssh" = 'yes' -a -n "$SSH_CLIENT" \) ] and set -l display_hostname if set -q display_user