You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I was just wondering if bun shell module api has some way to pass argument without escaping.
let files = [ 'f1.txt', 'f 2.txt'] // f2 contains "space" so it should be quote.
await $`ls ${files.map(f => $.escape(f)).join(" ")}`.nothrow()
// ls: "f1.txt" "f 2.txt": No such file or directory
Like this, If there's argument that requires quote, each argument should be escaped.
Is there any to simply pass argument, and we don't have to care about escape rules?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I was just wondering if bun shell module api has some way to pass argument without escaping.
Like this, If there's argument that requires quote, each argument should be escaped.
Is there any to simply pass argument, and we don't have to care about escape rules?
this works fine on bun, but is there alternative in bun shell module?
Beta Was this translation helpful? Give feedback.
All reactions