42 Commits

Author SHA1 Message Date
Santo Cariotti
2d84686b25 feat: write only one time the info on stdout 2021-10-29 19:14:16 +02:00
Anton Hermann
10f7462b8b Introduce new type for policy on how to handle questions 2021-10-21 23:31:53 +02:00
João Marcos Bezerra
e17eb9595e Merge branch 'master' into migrate-to-clap 2021-10-20 14:04:19 -03:00
TATSUNO Yasuhiro
5f7d777342
Change display of current directory (#119) 2021-10-20 00:57:11 -03:00
TATSUNO Yasuhiro
b8a2c3899e Use a same term as in command 2021-10-20 10:54:14 +09:00
Spyros Roum
e24c9ce931 Replace oof with clap 2021-10-19 14:42:07 +03:00
Dominik Nakamura
06af320595
Add support for short tar archive extensions 2021-10-18 00:42:35 +09:00
João Marcos Bezerra
2c5a57c01c
Merge pull request #91 from SpyrosRoum/properly-compress-partially-compressed-files
Properly detect if we are compressing a partially compressed file
2021-10-15 11:38:02 -03:00
João Marcos Bezerra
d33dd7f445
Merge branch 'master' into Improve-FinalError 2021-10-15 11:23:25 -03:00
Spyros Roum
d852a5897c Change FinalError builder pattern to take and give ownership of self
This means that when you do `let e = FinalError::with_title("Foo").detail("Blah");`, `e` will be of type `FinalError` instead of `&mut FinalError`, thus you don't have to call `clone()` on it
2021-10-15 14:20:49 +03:00
João M. Bezerra
05f82d3aee Adding unwrap safety for file_name 2021-10-15 05:45:56 -03:00
figsoda
161b8d0d66 refactor: better NO_COLOR support 2021-10-14 21:27:11 -04:00
Spyros Roum
baf23fa685 Use represents_several_files instead of checking len of files 2021-10-15 02:45:07 +03:00
Spyros Roum
aa65743e4e Add some info! for the user 2021-10-15 02:44:34 +03:00
Spyros Roum
123ccddd91 Move the check to run function 2021-10-15 02:44:15 +03:00
figsoda
69e5e3291c
Fix single file decompression with specified output directory (#93) 2021-10-14 20:00:40 -03:00
Spyros Roum
9907ebcf36 Properly detect if we are compressing a partially compressed file 2021-10-15 00:33:17 +03:00
João Marcos Bezerra
c89c34a91f
Fix single format compression (#89)
Now working for formats that are not archives, like file.gz and file.xz
2021-10-14 18:17:52 -03:00
Santo Cariotti
1c24f41494
chore: print format type instead of index (#84)
When it raises an error caused by position of the format, now prints
the format type as string instead of the position inside the array of
formats.
In this way you can read on stdout the type like `.tar` or `.lz` instead
of `1`, `2`, .., `n`.
2021-10-14 17:18:46 -03:00
figsoda
f923423a06
Extension: add support for tgz (#85)
* extension: add support for tgz
2021-10-14 16:55:34 -03:00
figsoda
cd461fa5a5
apply clippy lints and small refactors (#86) 2021-10-14 16:22:48 -03:00
Vinícius Miguel
14961bed65
Check if a folder is being compressed to a non-archive format (#79) 2021-10-07 17:09:33 -03:00
Vinícius Rodrigues Miguel
a6eaef1220 commands: replace usage of "bundle" by "archive" 2021-10-06 22:37:36 -03:00
Vinícius Rodrigues Miguel
b093277a85 Refactor FinalError::display_and_crash into Error::Custom 2021-10-06 16:23:19 -03:00
Vinícius Miguel
a8beaaae84
Merge pull request #65 from ouch-org/buffers-capacity-improvement
Increasing read and writer buffers capacity
2021-10-06 01:07:28 -03:00
João M. Bezerra
5b54bf85ee Increasing read and writer buffers capacity
By changing from 8KB to 64KB we will be making 8 times less syscalls
2021-10-06 00:56:39 -03:00
Vinícius Rodrigues Miguel
e9bc65a787 Add support for Zstd 2021-10-05 23:56:09 -03:00
João M. Bezerra
89d1e6a752 Document modules 2021-10-03 00:17:57 -03:00
Vinícius Rodrigues Miguel
55aa65dcea Reduced repetition caused by [INFO] printing 2021-09-17 00:22:41 -03:00
Vinícius Rodrigues Miguel
eabaac0145 Run rustfmt 2021-09-16 21:35:18 -03:00
João M. Bezerra
c9d4eea403 Minor renaming 2021-08-13 02:14:28 -03:00
João M. Bezerra
33382d06c3 Adding more checks before compression 2021-08-04 12:05:41 -03:00
João M. Bezerra
bb93e46535 Reworked compression
Now works with multiple formats, like
archive.zip.gz.lz.gz.gz2.xz

Now with minimum in-memory copying, compressing and decompressing (with
exception to .zip, due to the format limitations) is all done directly
into the final destination file.
2021-08-03 21:18:22 -03:00
João M. Bezerra
b969bda5a8 Added check for missing formats when decompressing 2021-08-03 19:12:22 -03:00
João M. Bezerra
ac4948abf7 Decompression: multiple formats, no extra copying
Rewrote decompression to use chained decoders, creating a stream and
avoiding in-memory decompression, which caused redundant copying.

Now ouch supports any number of extensions as decompressing formats, not
only two.
2021-08-03 16:58:21 -03:00
Vinícius Rodrigues Miguel
a9673a3eba Reuse Confirmation struct when checking for overwrite permission 2021-07-25 01:23:58 -03:00
João M. Bezerra
57a3d231eb Turning oof subcrate into a module 2021-05-26 21:54:50 -03:00
João M. Bezerra
d01947d9e1 Adding rustfmt.toml and reformatting 2021-05-16 17:52:29 -03:00
Vinícius Miguel
2ba91644e8 commands: remove two unnecessary clones 2021-04-09 12:05:49 -03:00
Vinícius Miguel
0026e4d4de Drop dependency on Colored 2021-04-07 02:02:50 -03:00
João M. Bezerra
df1bc879cb New --help message 2021-04-06 22:52:41 -03:00
João M. Bezerra
973af5fe1c Change evaluator.rs to commands.rs 2021-04-06 21:18:56 -03:00