Skip to content

Consider supporting tar file #1112

Open
@upsuper

Description

@upsuper

Opening this issue as suggested by @BurntSushi in #1111.

I think it would be helpful if ripgrep can support scanning archive files. Scanning tar files can briefly done via -a option, but there are downsides:

  • you need to extract all files from the archive and scan again to identify the files you want
  • the line number is unhelpfully large
  • it may be wasting time on scanning files that we don't actually need

It is unclear how scanning archive files should work. It should definitely be opt-in just like --search-zip. We can probably add --search-archive or --search-tar for this purpose. I guess ideally archive files should probably be handled like directory rather than single file in that mode.

That should lead to some thing like

path/to/archive.tar/file1
something matched

path/to/archive.tar/file2
something else matched

@BurntSushi what do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAn enhancement to the functionality of the software.iceboxA feature that is recognized as possibly desirable, but is unlikely to implemented any time soon.questionAn issue that is lacking clarity on one or more points.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions