Change `RAD_HOME` indicator

f1d05dec018255e5406bd1586117096d234421dc
Alexis Sellier committed ago 1 parent 035f4aae
.zshrc +4 -2
165 165
# Set prompt
166 166
#
167 167
precmd() {
168 168
  local last=$?
169 169
  local indicator=">"
170 +
  local extra=""
170 171
171 172
  if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
172 173
    indicator="$(whoami)@$(cat /etc/hostname) #"
173 174
  fi
174 175
175 176
  if [ -n "$RAD_HOME" ]; then
176 -
    indicator="RAD_HOME=$RAD_HOME 🌱"
177 +
    indicator="🌱"
178 +
    extra=" RAD_HOME=$RAD_HOME"
177 179
  fi
178 180
179 181
  # Status
180 182
  if [ "$last" -eq 0 ]; then
181 183
    PROMPT="%{$fg[blue]%}$indicator %{$reset_color%}"
182 -
    RPROMPT=""
184 +
    RPROMPT="$extra"
183 185
  else
184 186
    PROMPT="%{$fg[red]%}$indicator %{$reset_color%}"
185 187
    RPROMPT=" $last"
186 188
  fi
187 189