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 nix_shell item #305

Merged
merged 2 commits into from
May 27, 2022
Merged

add nix_shell item #305

merged 2 commits into from
May 27, 2022

Conversation

oati
Copy link
Contributor

@oati oati commented May 24, 2022

Description

This PR adds the prompt item nix_shell, which checks and displays the IN_NIX_SHELL environment variable.

Motivation and Context

This makes the prompt display the shell status of Nix development environments.

How Has This Been Tested

  • I have tested using Linux.
  • I have tested using MacOS.

Checklist

(I have not tested the test files.)

  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.

@oati oati requested a review from IlanCosman as a code owner May 24, 2022 03:15
@oati oati changed the title add nix_shell item add nix_shell item May 24, 2022
@IlanCosman
Copy link
Owner

Thanks for the PR! Could you give me some basic instructions on how to test this in the real world? I have nix and nix-shell etc installed. What would I do next to get into a nix shell and have the IN_NIX_SHELL variable appear?

@deflock
Copy link

deflock commented May 24, 2022

I guess you can test it by nix-shell -p hello

@oati
Copy link
Contributor Author

oati commented May 24, 2022

I guess you can test it by nix-shell -p hello

you might have to do nix-shell -p hello --run fish

I'll mostly be using this for nix develop with nix-direnv inside flake projects.

Copy link
Owner

@IlanCosman IlanCosman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks for contributing :)

@IlanCosman IlanCosman merged commit c4e6dc4 into IlanCosman:main May 27, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants