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 prompt for Guix environment. #204

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

pmeiyu
Copy link

@pmeiyu pmeiyu commented Jun 20, 2019

This patch adds prompt for Guix environment.

What is Guix environment: https://www.gnu.org/software/guix/manual/en/html_node/Invoking-guix-environment.html

The purpose of guix environment is to assist hackers in creating reproducible development environments without polluting their package profile. The guix environment tool takes one or more packages, builds all of their inputs, and creates a shell environment to use them.

The value of $GUIX_ENVIRONMENT is too long to fit in the prompt string and it's content is cryptic. Something like this: /gnu/store/23lmq99gs7pqz0vlarjwz3bwws0h02jf-profile. Therefore this patch only prints "GUIX ENV" to the prompt line to indicate if we are in a Guix environment.

Update:
guix environment has been replaced by guix shell. So this patch is updated accordingly. The new prompt string is now a simple "guix".

@bobthecow
Copy link
Member

if guix is run with -r it does have a non-cryptic, useful name, right? should we use basename of that path or something for those cases?

i'm not a huge fan of GUIX ENV in the prompt. it's quite loud compared to the rest of the segments. maybe just guix, or an applicable glyph from nerd fonts if available?

@pmeiyu
Copy link
Author

pmeiyu commented Jun 21, 2019

Hi @bobthecow,

Thank you for your feedback.

if guix is run with -r it does have a non-cryptic, useful name, right?

No. -r option creates a symlink to $GUIX_ENVIRONMENT on file system, but the content of $GUIX_ENVIRONMENT is still cryptic.

i'm not a huge fan of GUIX ENV in the prompt. it's quite loud compared to the rest of the segments. maybe just guix, or an applicable glyph from nerd fonts if available?

Guix is too broad. It can stand for the GNU Guix distro(the operating system), or the GNU Guix functional package manager. Guix environment is only a small use case of the Guix functional package manager. Thus I don't think Guix can properly represent guix environment. I agree that GUIX ENV does not look good in the prompt, but I cannot come up with a better choice. What do you think?

@pmeiyu
Copy link
Author

pmeiyu commented Nov 9, 2021

guix environment has been replaced by guix shell. So this patch is updated accordingly. The new prompt string is now a simple "guix".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants