Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add guix shell integration #688

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions pure.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,13 @@ prompt_pure_precmd() {
fi
fi

# Guix package manager integration. If used from within 'guix shell'
if zstyle -T ":prompt:pure:environment:guix-shell" show; then
if [[ -n $GUIX_ENVIRONMENT ]]; then
psvar[12]="[env]"
fi
fi

# Make sure VIM prompt is reset.
prompt_pure_reset_prompt_symbol

Expand Down
4 changes: 4 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ You can set Pure to only `git fetch` the upstream branch of the current local br

`zstyle :prompt:pure:environment:nix-shell show no`

`guix-shell` integration adds the "[env]" to the prompt when used from within a guix shell. It is enabled by default, you can disable it with:

`zstyle :prompt:pure:environment:guix-shell show no`

## Colors

As explained in ZSH's [manual](http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting), color values can be:
Expand Down