We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When $.verbose = false then only output of the command should be displayed.
$.verbose = false
Example:
#!/usr/local/bin/node import { $ } from 'zx' $.verbose = false await ($`uptime`)
Expected output:
9:42 up 16 days, 21 mins, 1 user, load averages: 1.63 2.00 3.2
Based on the example above:
$ uptime 9:42 up 16 days, 21 mins, 1 user, load averages: 1.63 2.00 3.2
Suggested patch:
--- index.mjs +++ index.mjs.original @@ -53,12 +53,12 @@ let child = exec($.prefix + cmd, options) let stdout = '', stderr = '', combined = '' child.stdout.on('data', data => { - process.stdout.write(data) + if ($.verbose) process.stdout.write(data) stdout += data combined += data }) child.stderr.on('data', data => { - process.stderr.write(data) + if ($.verbose) process.stderr.write(data) stderr += data combined += data })
The text was updated successfully, but these errors were encountered:
Works for me.
⌘ zx ⎇ main ❯❯❯ cat foo.mjs #!/usr/local/bin/node import { $ } from './index.mjs' $.verbose = false await ($`uptime`) ⌘ zx ⎇ main ❯❯❯ node foo.mjs ⌘ zx ⎇ main ❯❯❯
Sorry, something went wrong.
That example is not displaying the output of the command. verbose should be just for the command.
verbose
No branches or pull requests
Expected Behavior
When
$.verbose = false
then only output of the command should be displayed.Example:
Expected output:
Actual Behavior
Based on the example above:
Steps to Reproduce the Problem
Specifications
Suggested patch:
The text was updated successfully, but these errors were encountered: