aboutsummaryrefslogtreecommitdiff
path: root/dot_config/zsh/executable_prompts
diff options
context:
space:
mode:
authortwells46 <173561638+twells46@users.noreply.github.com>2025-12-31 13:28:05 -0600
committertwells46 <173561638+twells46@users.noreply.github.com>2025-12-31 13:28:05 -0600
commit2140ab51deed88e90eafebf9520fa5f9995dc7c9 (patch)
tree03cf1dcd2900495c1efb79aaa85f3254ecd5fb87 /dot_config/zsh/executable_prompts
parentff8f50638e4b17a9d7cc88d2f0d9560b7effce39 (diff)
Migrate from stow
Diffstat (limited to 'dot_config/zsh/executable_prompts')
-rw-r--r--dot_config/zsh/executable_prompts24
1 files changed, 24 insertions, 0 deletions
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"