Skip to content

Filter for output of specific commands #434

Description

@reknih

Description: Allow me to filter which command outputs I want to display. Still run all tasks.

Use case: I want to debug a particular task of the set of tasks I run with concurrently and focus on its outputs. At the moment, I solve this by calling npm run dev | grep name-of-task. This works but potentially includes false positives. Additionally, concurrently will not color the task name because it is not directly attached to the terminal.

Activity

  1. gustavohenke commented on Jul 15, 2023

    @gustavohenke
    Member

    How does the existing --hide flag work for you?

  2. amannn commented on Aug 4, 2023

    @amannn

    I have a similar situation. I have two processes and would like to use --hide 1 --raw, so that only the output from the first process is displayed. Unfortunately, --raw seems to ignore any --hide argument.

    Would it make sense to support this?

  3. gustavohenke commented on Oct 2, 2023

    @gustavohenke
    Member

    Yes, but note that raw mode implies inheriting stdio, which means no control over the output.

    ...(raw && { stdio: 'inherit' as const }),

    It might be possible to change it to ignore instead of inherit to support your use case.

  4. reknih commented on Oct 2, 2023

    @reknih
    Author

    How does the existing --hide flag work for you?

    It works I guess but I run many tasks, so it's much easier to list the task I want to see instead of every other task.

  5. wottpal commented on Aug 24, 2024

    @wottpal

    Thumbs up for --hide 1 --raw . Did anyone manage to get this working (with colors)?

    Update: Found a surprisingly simple solution:

    concurrently \"command-1\" \"command-2 > /dev/null 2>&1\" --raw
    
  6. gustavohenke commented on Aug 25, 2024

    @gustavohenke
    Member

    Hey @wottpal and @amannn, the --hide + --raw flag combo has been fixed by #486. It's not yet released.

  7. gustavohenke commented on Sep 8, 2024

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions