Skip to content

Commit d4b0a87

Browse files
committed
core: Make 'use' refer :all by default
1 parent 96ac156 commit d4b0a87

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

core/src/yamlscript/externals.clj

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@
146146
:as [:as nil]
147147
:get [:get []]
148148
:all [:all true]
149+
:none [:none true]
149150
:not [:not []]
150151
[nil arg])
151152
parsed (if k
@@ -183,6 +184,16 @@
183184
(let [module (str module)
184185
modpath (str/replace module #"\." "/")
185186
args (parse-args args)
187+
all (:all args)
188+
args (cond
189+
(:none args) (dissoc args :all :none)
190+
(and
191+
(not all)
192+
(not (or
193+
(:as args)
194+
(:get args)
195+
(:not args)))) (assoc args :all true)
196+
:else args)
186197
from (or (:from args) {:yspath (get-yspath @sci/file)})
187198
[kind spec] (first from)]
188199
(case kind

0 commit comments

Comments
 (0)