2

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.

1 Answer 1

1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .