aboutsummaryrefslogtreecommitdiff
path: root/src/venv.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/venv.rs')
-rw-r--r--src/venv.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/venv.rs b/src/venv.rs
index 7906abc..da6830c 100644
--- a/src/venv.rs
+++ b/src/venv.rs
@@ -17,3 +17,16 @@ pub fn get_name() -> colored::ColoredString {
17 return "".white() 17 return "".white()
18} 18}
19 19
20pub fn in_nix_shell() -> colored::ColoredString {
21 match env::var("IN_NIX_SHELL") {
22 Ok(p) => {
23 if p == "pure" {
24 "(nix) ".green()
25 } else {
26 "(nix) ".red()
27 }
28 }
29 _ => return "".white(),
30 }
31}
32