8000 Echo only command output · Issue #636 · google/zx · GitHub
[go: up one dir, main page]

Skip to content

Echo only command output #636

Closed
Closed

Description

@antonmedv

#91 (comment)

$.verbose = false
await $`program 2>&1`.pipe(process.stdout)

The only way I could get piped commands to actually be captured, and then output it, was the following, which I'm sure could be done better, but was the only thing that worked for me - note I did try using the

.pipe($`someCommand`) 

option, but no luck for me, lol! This allows me to just copy some stuff I try at the command line straight in as well, so not too bad :D

let it = (await $`cat db.template.sql | grep 'CREATE TABLE'`).stdout;
console.log(it);

Originally posted by @bradparks in #91 (comment)

Activity

  1. thekartikeyamishra commented on May 29, 2023

    @thekartikeyamishra

    I would like to Collaborator on this issue can you assign me this .

  2. antonmedv commented on May 29, 2023

    @antonmedv
    CollaboratorAuthor

    I am planning a big refactoring in the v8 so it's better to leave it for me right now.

  3. stevage commented on Jun 20, 2023

    @stevage

    Just came here to request this.

    Instead of $.verbose there should be a separate $.echo (print commands as they are run) and $.quiet (don't show output).

  4. fabianmarcus commented on Sep 1, 2023

    @fabianmarcus

    I am also interested in this feature. Otherwise it's not possible to quietly save values into variables. Its always printed out.

  5. Zamiell commented on Oct 28, 2023

    @Zamiell

    I am planning a big refactoring in the v8 so it's better to leave it for me right now.

    I am eagerly awaiting version 8. In the mean time, can we add this foot gun to the Known Issues?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0