More robust hostname on remote sessions

a42c7deaf63704dfeecfa9c293e7e498de436d32
Alexis Sellier committed ago 1 parent de9f2ab1
.zshrc +1 -1
155 155
precmd() {
156 156
  local last=$?
157 157
  local remote=""
158 158
159 159
  if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
160 -
    remote=" $(whoami)@$(hostname)"
160 +
    remote=" $(whoami)@$(cat /etc/hostname)"
161 161
  fi
162 162
163 163
  # Status
164 164
  if [ "$last" -eq 0 ]; then
165 165
    PROMPT="%{$fg[blue]%}> %{$reset_color%}"