浏览代码

nixpkgs/elvish: move local import later

Thomas Dy 2 年之前
父节点
当前提交
f5be0cd060
共有 1 个文件被更改,包括 9 次插入6 次删除
  1. 9 6
      .config/nixpkgs/elvish/lib/config.elv

+ 9 - 6
.config/nixpkgs/elvish/lib/config.elv

@@ -2,12 +2,6 @@ use prompt
 use nix-shell
 use direlv
 
-# import local.elv if present, for example, from ~/.config/elvish/lib/local.elv
-try {
-  use local
-} catch e {
-}
-
 edit:add-var ls~ { |@a|
   e:ls --color=auto --group-directories-first -F --quoting-style literal $@a
 }
@@ -44,3 +38,12 @@ set edit:after-command = [{|m|
     printf "%s took %.3fs\n" $cmd $m[duration]
   }
 }]
+
+# import local.elv if present, for example, from ~/.config/elvish/lib/local.elv
+try {
+  use local
+} catch e {
+  if (not-eq $e[reason] "<unknown no such module: local>") {
+    fail $e
+  }
+}