Browse Source

nixpkgs/elvish: avoid nesting direlv

Thomas Dy 10 months ago
parent
commit
4f33699e90
1 changed files with 5 additions and 1 deletions
  1. 5 1
      .config/nixpkgs/elvish/lib/config.elv

+ 5 - 1
.config/nixpkgs/elvish/lib/config.elv

@@ -1,12 +1,16 @@
 use str
 use prompt
 use nix-shell
-use direlv
 use title
 use eval-export
 use completion
 use pushd
 
+# don't use direlv if we're in a nix-shell to avoid nesting direlvs
+if (not (has-env IN_NIX_SHELL)) {
+  use direlv
+}
+
 edit:add-var ls~ { |@a|
   e:ls --color=auto --group-directories-first -F --quoting-style literal $@a
 }