From 2140ab51deed88e90eafebf9520fa5f9995dc7c9 Mon Sep 17 00:00:00 2001 From: twells46 <173561638+twells46@users.noreply.github.com> Date: Wed, 31 Dec 2025 13:28:05 -0600 Subject: Migrate from stow --- dot_config/zsh/executable_prompts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 dot_config/zsh/executable_prompts (limited to 'dot_config/zsh/executable_prompts') diff --git a/dot_config/zsh/executable_prompts b/dot_config/zsh/executable_prompts new file mode 100644 index 0000000..93be077 --- /dev/null +++ b/dot_config/zsh/executable_prompts @@ -0,0 +1,24 @@ +#echo "Loading prompts..." +# Some simple prompts +#PS1='%n@%m %~ $ ' +#PS1='%F{green}%n@%m%f %F{blue}%~ $%f ' + +# Autoload zsh add-zsh-hook and vcs_info functions (-U autoload w/o substition, -z use zsh style) +autoload -Uz add-zsh-hook vcs_info +# Enable substitution in the prompt. +setopt prompt_subst +# Run vcs_info just before a prompt is displayed (precmd) +precmd_vcs_info() { vcs_info } +precmd_functions+=( precmd_vcs_info ) +# Enable checking for (un)staged changes, enabling use of %u and %c +zstyle ':vcs_info:*' check-for-changes true +# Set custom strings for an unstaged vcs repo changes (*) and staged changes (+) +zstyle ':vcs_info:*' unstagedstr ' *' +zstyle ':vcs_info:*' stagedstr ' +' +# Set the format of the Git information for vcs_info +zstyle ':vcs_info:git:*' formats '(%b%u%c)' +zstyle ':vcs_info:git:*' actionformats '(%b|%a%u%c)' + +PROMPT='%F{white}[ %n%F{red}@%F{white}%m ] %{$fg_bold[cyan]%}%~%{$reset_color%} ${vcs_info_msg_0_}'$'\n''%(?:%F{green}>%F{white} :%F{red}[%?] >%F{white} )' + +#echo "Prompts loaded" -- cgit v1.2.3