From 2e5924bc35aa5c482e36df24b0e6fb28a0449906 Mon Sep 17 00:00:00 2001 From: meliurwen Date: Mon, 11 Sep 2023 23:10:52 +0200 Subject: [PATCH] zshrc: if the default prompt is detected (no custom prompt theme is set), then set the custom fallback one --- zsh/.zshrc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index f85513c..a03c513 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -249,4 +249,7 @@ for plugin_f in "${XDG_CONFIG_HOME:-$HOME/.config}/zsh/plugins/"*(.zsh|.zsh-them source $plugin_f || printf "An error has occurred sourcing: %s\n" "$plugin_f" done -#PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b " +# If a default prompt is set, then change to this custom one +if [ "$PS1" = "%m%# " ]; then + PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b " +fi