parallel icon indicating copy to clipboard operation
parallel copied to clipboard

GNU parallel -X equivalent parameter(s)

Open hongxuchen opened this issue 7 years ago • 3 comments

When using parallel with grep/ripgrep, without particular options, neither this parallel nor GNU parallel will display the file name (xargs works well). But GNU parallel has an -X that can solve this issue. How can I achieve with this parallel's command line?

2018-09-27-204342_1919x856_scrot

BTW, when using xargs with ripgrep, the matched patterns can still be highlighted automatically (--color=auto); while neither GNU parallel nor this parallel can keep the highlighting.

hongxuchen avatar Sep 27 '18 12:09 hongxuchen

With GNU Parallel try:

parallel --tty grep --color=auto -H foo ::: *

It should keep the highlighting and the file name.

ole-tange avatar Oct 01 '18 07:10 ole-tange

@ole-tange it works for GNU parallel (find -name "*.rs" | /usr/bin/parallel --tty grep --color=auto -H _init) in terms of coloring matched. Any idea for this Rust parallel command?

hongxuchen avatar Oct 01 '18 07:10 hongxuchen

@ole-tange Sorry I just noticed you're the author of GNU parallel :smiley_cat:

hongxuchen avatar Oct 01 '18 07:10 hongxuchen