Skip to content

A particular "git ... | xargs ..." kills the shell #267

Description

@certik

The following will kill the shell on macOS:

git for-each-ref --format='%(refname:short)' refs/heads | xargs -I {} sh -c 'echo "Branch: {}"; git grep "search_term" {}'

It's not a minimal example, likely it can be made shorter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions