-
-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
${childProcessResult}
shortcut notation
#523
Comments
${childProcess}
shortcut notation${childProcessResult}
shortcut notation
Agreed, this would be a nice and subtle DX improvement. Two initial thoughts:
const branch = await $({encoding: null})`git branch --show-current`
await $`dep deploy --branch=${branch}` // <- Would parseTemplates convert the buffer to a string? |
It is a plain object: Lines 141 to 152 in eae327c
I think just checking if the value is a plain object with a
That's a great question! Considering the arguments are escaped and passed as is, I think we might allow buffer encodings? I.e. if However, if Additional note about stripping the final newline: it is already performed by default on Line 37 in eae327c
Lines 68 to 70 in eae327c
|
That sounds fine. If we really want to ensure users don't pass in something incorrect, we can add an internal |
I like it 👍 |
@aaronccasanova Would you be interesting in implementing it? If not, no worries! :) |
I have bandwidth to help out with this update 👍 I'll likely need some assistance dialing in the right test cases, but I'll push up a draft implementation and we can go from there! |
zx has a
${childProcessResult}
shortcut notation:This is equivalent to:
This is quite handy and would be minimal to implement for us as part of the new
$
API.What do you think @sindresorhus @aaronccasanova?
The text was updated successfully, but these errors were encountered: