Skip to content

Commit

Permalink
feat: theme_display_hostname variable
Browse files Browse the repository at this point in the history
toggles displaying the hostname

Signed-off-by: Beau Hastings <[email protected]>
  • Loading branch information
hastinbe committed Oct 9, 2020
1 parent e5c3a7c commit 0b2c886
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ set -g theme_display_time yes
## Disable playing the user's current group.
set -g theme_display_group no
# Display the system hostname.
set -g theme_display_hostname no
## Disable Git-awareness.
set -g theme_display_git no
Expand Down
9 changes: 7 additions & 2 deletions fish_prompt.fish
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ end
## Display the user's current group
#set -g theme_display_group no
#
# Display the system hostname
#set -g theme_display_hostname no
#
## Display git branch status
#set -g theme_display_git no
#
Expand Down Expand Up @@ -161,8 +164,10 @@ function __theme_print_userhost
print_colored (id -gn) $theme_color_group
end

print_colored "@" $theme_color_separator
print_colored (prompt_hostname) $theme_color_host
if [ "$theme_display_hostname" != 'no' ]
print_colored "@" $theme_color_separator
print_colored (prompt_hostname) $theme_color_host
end
end
function __theme_print_virtualenv
[ "$theme_display_virtualenv" = 'no' -o -z "$VIRTUAL_ENV" ]; and return
Expand Down

0 comments on commit 0b2c886

Please sign in to comment.