Expose NIX_SHELL_LEVEL to make it easy to track how many shells deep you are #826
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
awaiting
author
awaiting
contributors
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
Feature/S3
Importance
High
Importance
Low
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
Release Blocking
Non-urgent
Release Blocking
Urgent
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
Urgency
High
Urgency
Low
ux
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lix-project/lix#826
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Is your feature request related to a problem? Please describe.
When working with nix shells in development environments, I often accidentally close the windows, by closing the last shell because it is hard to see how many levels deep you are in a nix shells.
This is exacerbated by using direnv, so even the outermost shell becomes a nix shell, thus loosing the ability to stop closing shells as soon as it is not a nix shell anymore.
Describe the solution you'd like
Ideally I would like some metadata that allows me to show what has been activated in this nix-shell, but I would also settle for a simple counter, so I can at least see when I am in the last one.
Describe alternatives you've considered
Something like
NIX_ACTIVATED_PACKAGESmight be nice, but perhaps only in addition toNIX_SHELL_LEVELWhat do you think? Is there already something like this that I just missed?
This issue was mentioned on Gerrit on the following CLs: