summaryrefslogtreecommitdiff
path: root/dotfiles-darwin/zsh/rc
diff options
context:
space:
mode:
authorGrégoire Duchêne <gduchene@awhk.org>2024-11-17 15:04:05 +0000
committerGrégoire Duchêne <gduchene@awhk.org>2024-11-17 15:04:05 +0000
commite589b5788c0acb452f1e1391f49b5877f5e69d27 (patch)
tree6f8b3786b330f3d36fbe9552f7c7d014ca6de270 /dotfiles-darwin/zsh/rc
parent0aa07d33cc0214b02c175e65a53d7456cad3be21 (diff)
darwin/zsh: Move terminal configuration to rc
Diffstat (limited to 'dotfiles-darwin/zsh/rc')
-rw-r--r--dotfiles-darwin/zsh/rc17
1 files changed, 17 insertions, 0 deletions
diff --git a/dotfiles-darwin/zsh/rc b/dotfiles-darwin/zsh/rc
index 9a71cdc..bb9e027 100644
--- a/dotfiles-darwin/zsh/rc
+++ b/dotfiles-darwin/zsh/rc
@@ -12,3 +12,20 @@ if (( ${+commands[gls]} )); then
else
alias lsh='ls -Shlr | cut -f5- -w'
fi
+
+# Prevent Apple Terminal from cluttering ${HOME}.
+if [[ ${TERM_PROGRAM} == Apple_Terminal ]]; then
+ SHELL_SESSIONS_DISABLE=1
+fi
+
+if [[ ${TERM_PROGRAM} != iTerm.app ]]; then
+ autoload -Uz vcs_info
+
+ zstyle ':vcs_info:*' enable git
+ zstyle ':vcs_info:*' formats '[%b]'
+
+ RPROMPT='${vcs_info_msg_0_}'
+ precmd_functions+=(vcs_info)
+
+ setopt PROMPT_SUBST
+fi