Skip to content

Commit

Permalink
Do not show hostname when running in GitHub Codespaces (#604)
Browse files Browse the repository at this point in the history
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
  • Loading branch information
MarshallOfSound and sindresorhus committed Aug 15, 2021
1 parent b122bbf commit 98a57d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pure.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -692,8 +692,8 @@ prompt_pure_state_setup() {
# Show `username@host` if logged in through SSH.
[[ -n $ssh_connection ]] && username='%F{$prompt_pure_colors[user]}%n%f'"$hostname"

# Show `username@host` if inside a container.
prompt_pure_is_inside_container && username='%F{$prompt_pure_colors[user]}%n%f'"$hostname"
# Show `username@host` if inside a container and not in GitHub Codespaces.
[[ -z "${CODESPACES}" ]] && prompt_pure_is_inside_container && username='%F{$prompt_pure_colors[user]}%n%f'"$hostname"

# Show `username@host` if root, with username in default color.
[[ $UID -eq 0 ]] && username='%F{$prompt_pure_colors[user:root]}%n%f'"$hostname"
Expand Down

0 comments on commit 98a57d9

Please sign in to comment.