-
-
Notifications
You must be signed in to change notification settings - Fork 143
Add subshell level section #355
Copy link
Copy link
Open
Labels
⭐️ ideafeature request or suggestionfeature request or suggestion🙏 help wantedneeds PR or help on decisionneeds PR or help on decision
Metadata
Metadata
Assignees
Labels
⭐️ ideafeature request or suggestionfeature request or suggestion🙏 help wantedneeds PR or help on decisionneeds PR or help on decision
Type
Fields
Give feedbackNo fields configured for issues without a type.
Env
Pure
Fish
OS/distribution
Background
I frequently use
nix shellto make an environment with some additional tools in NixOS. I want some indication of that environment. There is apure_enable_nixdevshelloption, but it is only applicable fornix developshell. Unfortunately there is no way to determinenix shellenvironment (see NixOS/nix#6677). Luckily fish providesSHLVLvariable for subshell counting. It can be a solution for my problem. It is also can be somehow applicable in non-NixOS distributions.Solution
Add a feature to display subshell level when it is greater than 2 by inspecting
SHLVLvariable.I wanted to implement it by myself, but seems pure does not offer custom section. BTW it could be a great feature too. Probably there is other way without patching code which I would like to avoid?