From b303c1b5c583ef79ba1b8a5ef0a7682c2eb4777a Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Sat, 17 Mar 2018 21:34:38 -0700 Subject: [PATCH] virtualenv info in prompt --- dotfiles/zprezto_custom/matir/functions/prompt_matir_setup | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dotfiles/zprezto_custom/matir/functions/prompt_matir_setup b/dotfiles/zprezto_custom/matir/functions/prompt_matir_setup index 1648d97..60f0c80 100644 --- a/dotfiles/zprezto_custom/matir/functions/prompt_matir_setup +++ b/dotfiles/zprezto_custom/matir/functions/prompt_matir_setup @@ -18,11 +18,14 @@ function prompt_matir_setup { zstyle ':vcs_info:*' stagedstr '*' zstyle ':vcs_info:*' unstagedstr '*' - # TODO: add virtualenv/rvm info + # Virtualenv formatting + zstyle ':prezto:module:python:info:virtualenv' format ' (py:%v)' + PROMPT='%{$fg[black]%}[%{$fg[yellow]%}%h%{$fg[black]%}] ' # History # PROMPT+='%{%(!.$fg[red].$fg[green])%}%8>..>%n%>>%{$fg[white]%}@' # username@ PROMPT+='%{$fg[blue]%}%12>..>%m%>>%{$fg[white]%}:' # hostname PROMPT+='%{$fg[green]%}%32<...<%~%<<' # path + PROMPT+='%{$fg[magenta]%}${python_info[virtualenv]}' # virtualenv PROMPT+='%{$fg[blue]%}${vcs_info_msg_0_}' # VCS info PROMPT+='%{$fg[white]%}%#%{$reset_color%} ' # prompt symbol @@ -47,6 +50,7 @@ function prompt_matir_setup { function prompt_matir_precmd { vcs_info + python-info } prompt_matir_setup "$@"