Przeglądaj źródła

nixpkgs/elvish: avoid nesting direlv

Thomas Dy 10 miesięcy temu
rodzic
commit
4f33699e90
1 zmienionych plików z 5 dodań i 1 usunięć
  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
 }