File tree 1 file changed +24
-1
lines changed
1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ import module [
182
182
'word [any-type! ]
183
183
/into "Help text will be inserted into provided string instead of printed"
184
184
string [string! ] "Returned series will be past the insertion"
185
- /local value spec args refs rets type ret desc arg def des ref
185
+ /local value spec args refs rets type ret desc arg def des ref str
186
186
] [
187
187
try [
188
188
max-desc-width: (query /mode system/ports/input 'buffer-cols) - 35
@@ -223,6 +223,29 @@ import module [
223
223
]
224
224
throw true
225
225
]
226
+ refinement? :word [
227
+ output [mold :word "is" form-type :word "used in these functions:^/^/ " ]
228
+ str: copy ""
229
+ foreach [name val] system/contexts/lib [
230
+ ;probe word
231
+ if all [
232
+ any-function? :val
233
+ spec: spec-of :val
234
+ desc: find/tail spec :word
235
+ ][
236
+ str: join "^[ [1;32m" form-pad name 15
237
+ append str "^[ [m "
238
+ append str form-pad type? :val 11 - min 0 ((length? str) - 15 )
239
+ append str join "^[ [1;32m" mold :word
240
+ if string? desc/1 [
241
+ append str " ^[ [0;32m"
242
+ append str desc/1
243
+ ]
244
+ output ajoin [" " str "^[ [m^/ " ]
245
+ ]
246
+ ]
247
+ throw true
248
+ ]
226
249
not any [word? :word path? :word ] [
227
250
output [mold :word "is" form-type :word ]
228
251
throw true
You can’t perform that action at this time.
0 commit comments