I have some problems with configuring zsh grml shell. I coppied /etc/zshrc file to my home dir, and start using it. I noticed lack of virtualenv name while working with python. So I tried to run grml_theme_add_token virtual-env -f virtual_env_prompt
and it did nothing. So what should I do to get virtualenv name displayed inside zsh grml shell?
I installed grml config from arch repos.
Add a comment
|
1 Answer
https://www.pedaldrivenprogramming.com/2018/09/customize-grml-zsh-config/ covers it nicely:
Update your ~/.zshrc.local
to contain the following:
# Define the token and register it with grml
function virtual_env_prompt () {
REPLY=${VIRTUAL_ENV+(${VIRTUAL_ENV:t}) }
}
grml_theme_add_token virtual-env -f virtual_env_prompt '%F{magenta}' '%f'
# Make the prompt use the token
zstyle ':prompt:grml:left:setup' items rc change-root user at host path virtual-env vcs percent