summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChloƩ Vulquin <code@toast.bunkerlabs.net>2026-01-18 22:39:04 +0100
committerChloƩ Vulquin <code@toast.bunkerlabs.net>2026-01-18 22:39:04 +0100
commit45f4cb16249ae8cb9efa1cce260aed43478a736e (patch)
tree5beeab9c707d18fb7319b297b9beb681f070537c
parentzsh: even bigger rewrite (diff)
zsh: prompt debugging...
-rw-r--r--dot_config/zsh/functions/prompt_fish_setup14
-rw-r--r--dot_config/zsh/zshrc1
2 files changed, 5 insertions, 10 deletions
diff --git a/dot_config/zsh/functions/prompt_fish_setup b/dot_config/zsh/functions/prompt_fish_setup
index 35eaeb9..397b3e0 100644
--- a/dot_config/zsh/functions/prompt_fish_setup
+++ b/dot_config/zsh/functions/prompt_fish_setup
@@ -4,20 +4,14 @@
# while being a minimal/cheap implementation
setopt promptsubst
-autoload -Uz add-zsh-hook
-autoload -Uz vcs_info # make sure you configure yours!
-_prompt_fish_chpwd() { FORCE_RUN_VCS_INFO=1; }
-_prompt_fish_precmd() { vcs_info fish; }
-
-add-zsh-hook chpwd _prompt_fish_chpwd
-add-zsh-hook precmd _prompt_fish_precmd
-
-add-zsh-hook -Uz chpwd vcs_info
+# make sure you configure vcs_info!
+# TODO: this doesn't seem to consistently run just after starting, why?
+autoload -RUz add-zsh-hook
+add-zsh-hook -Uz precmd vcs_info
local login='%(!.%F{red}.%F{green})%n%f@%m'
local vcsinfo='${vcs_info_msg_0_:+ $vcs_info_msg_0_}'
local returnc='%(0?.. %F{red}[%?]%f)'
local separator='%(!.#.>)'
-
PS1="$login %~$vcsinfo$returnc$separator "
diff --git a/dot_config/zsh/zshrc b/dot_config/zsh/zshrc
index 72452e9..f7d4cc2 100644
--- a/dot_config/zsh/zshrc
+++ b/dot_config/zsh/zshrc
@@ -56,6 +56,7 @@ tt() {
# set up jump/zoxide/etc
# zstyle :completion:*:hosts list of hosts
# hash -d short=directory
+# setup terminal integration / osc0
xzsource zshrc.{local,post}
# if compinit hasn't ran, run it now