diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/app.rs | 2 | ||||
-rw-r--r-- | src/decompressor.rs | 3 |
2 files changed, 4 insertions, 1 deletions
@@ -1445,7 +1445,7 @@ This flag can be used with the -o/--only-matching flag. fn flag_search_zip(args: &mut Vec<RGArg>) { const SHORT: &str = "Search in compressed files."; const LONG: &str = long!("\ -Search in compressed files. Currently gz, bz2, xz, and lzma files are +Search in compressed files. Currently gz, bz2, xz, lzma and lz4 files are supported. This option expects the decompression binaries to be available in your PATH. diff --git a/src/decompressor.rs b/src/decompressor.rs index a94948af..235849b7 100644 --- a/src/decompressor.rs +++ b/src/decompressor.rs @@ -44,6 +44,7 @@ lazy_static! { m.insert("gz", DecompressionCommand::new("gzip", ARGS)); m.insert("bz2", DecompressionCommand::new("bzip2", ARGS)); m.insert("xz", DecompressionCommand::new("xz", ARGS)); + m.insert("lz4", DecompressionCommand::new("lz4", ARGS)); const LZMA_ARGS: &[&str] = &["--format=lzma", "-d", "-c"]; m.insert("lzma", DecompressionCommand::new("xz", LZMA_ARGS)); @@ -55,6 +56,7 @@ lazy_static! { builder.add(Glob::new("*.gz").unwrap()); builder.add(Glob::new("*.bz2").unwrap()); builder.add(Glob::new("*.xz").unwrap()); + builder.add(Glob::new("*.lz4").unwrap()); builder.add(Glob::new("*.lzma").unwrap()); builder.build().unwrap() }; @@ -63,6 +65,7 @@ lazy_static! { builder.add(Glob::new("*.tar.gz").unwrap()); builder.add(Glob::new("*.tar.xz").unwrap()); builder.add(Glob::new("*.tar.bz2").unwrap()); + builder.add(Glob::new("*.tar.lz4").unwrap()); builder.add(Glob::new("*.tgz").unwrap()); builder.add(Glob::new("*.txz").unwrap()); builder.add(Glob::new("*.tbz2").unwrap()); |