Some questions about kar
command 🤔
#1382
-
// Name: Test
await arg('', args.map(x => x.toString())) # No reaction
~/.kit/kar "my-kenv/__Test.js" a b c
# OK
~/.kit/kar "my-kenv/__Test.js" |
Beta Was this translation helpful? Give feedback.
Answered by
johnlindquist
Nov 19, 2023
Replies: 1 comment 1 reply
-
You need to grab the args first, then clear them out: import "@johnlindquist/kit"
let choices = args.map(x => x.toString())
args = []
await arg("Select", choices) Make sense? |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
alkene0005
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@alkene0005
await arg()
will pull off the first arg passed in, then complete. So in your example,arg
is immediately completing with the value "a".You need to grab the args first, then clear them out:
Make sense?