diff options
| author | Leonardo Bishop <me@leonardobishop.net> | 2025-12-21 17:46:15 +0000 |
|---|---|---|
| committer | Leonardo Bishop <me@leonardobishop.net> | 2025-12-21 17:46:15 +0000 |
| commit | 63d97593c88330d2ab984681be913acf2d7099d9 (patch) | |
| tree | 2655ebad8f5ed6cac9acaf392b06c75c1a92e735 | |
| parent | 2cbc77a8d17ae8c941f7008b31505fa616b53d87 (diff) | |
| -rw-r--r-- | zsh/config/other/nvm.zsh | 1 | ||||
| -rw-r--r-- | zsh/config/prompt.zsh | 16 |
2 files changed, 14 insertions, 3 deletions
diff --git a/zsh/config/other/nvm.zsh b/zsh/config/other/nvm.zsh deleted file mode 100644 index b761aa2..0000000 --- a/zsh/config/other/nvm.zsh +++ /dev/null @@ -1 +0,0 @@ -source /usr/share/nvm/init-nvm.sh diff --git a/zsh/config/prompt.zsh b/zsh/config/prompt.zsh index 1a9776b..1034836 100644 --- a/zsh/config/prompt.zsh +++ b/zsh/config/prompt.zsh @@ -8,6 +8,18 @@ current_time() { echo "%{$fg[white]%}[%*]" } +container_l() { + if [[ -n "${CONTAINER_ID:-}" ]]; then + echo "%{$fg[cyan]%}*%{$reset_color%} " + fi +} + +container_r() { + if [[ -n "${CONTAINER_ID:-}" ]]; then + echo "(%{$fg[cyan]%}$CONTAINER_ID%{$reset_color%}) " + fi +} + return_status() { local LAST_EXIT_CODE=$? if [[ $LAST_EXIT_CODE -ne 0 ]]; then @@ -28,8 +40,8 @@ precmd() { VCS_STATUS="(%F{green}${vcs_info_msg_0_}%f) " fi fi - PROMPT='%B$(directory)%b %# %f' - RPROMPT='$(return_status)${VCS_STATUS}$(current_time)%f' + PROMPT='$(container_l)%B$(directory)%b %# %f' + RPROMPT='$(return_status)${VCS_STATUS}$(container_r)$(current_time)%f' } zstyle ':vcs_info:*' check-for-changes true |
