581 Commits

Author SHA1 Message Date
figsoda
51855948f1 add OutputLine trait for performance improvements 2022-10-13 11:31:43 -04:00
figsoda
dd6ab2aa6e rename out to log_out 2022-10-13 10:27:04 -04:00
figsoda
2f4404e658 use humansize instead of Bytes 2022-10-12 22:33:41 -04:00
figsoda
8b0f4f3ee4 rewrite progress module 2022-10-12 20:49:33 -04:00
figsoda
09d390608f set last modified time during zip compression 2022-10-11 22:01:13 -04:00
João M. Bezerra
a2c91c4248 minor tweaks 2022-10-11 22:09:39 -03:00
João M. Bezerra
71893aafeb Refactor the way we set last modified times
Last modified time is a piece of metadata that is available when
decompressing an archive
2022-10-11 22:09:39 -03:00
João Marcos Bezerra
e12c25e833
Merge pull request #277 from ouch-org/wann-file-extension-passed-as-file-name
Warn user if file extension is passed as file name
2022-10-11 21:19:02 -03:00
João M. Bezerra
f554e3c5f0 warn user if file extension is passed as file name
example: .tar.gz is a file named .tar with extension .gz

this can be confusing because people might expect .tar.gz to be a
.tar.gz archive, but it's currently not
2022-10-11 20:57:55 -03:00
João Marcos Bezerra
cd21ee99b8
Merge pull request #276 from figsoda/update-deps
bump dependencies
2022-10-11 17:41:45 -03:00
figsoda
dfb3a367e4 bump dependencies 2022-10-11 16:27:27 -04:00
João M. Bezerra
22697737cd show aliases on --help 2022-10-11 17:19:08 -03:00
figsoda
5dc8d3efed fix: apply clippy lints 2022-10-03 20:56:48 -04:00
figsoda
5d27a0cd0b feat: generate man pages with clap_mangen 2022-10-03 20:56:48 -04:00
João Marcos Bezerra
398a619018
Merge pull request #271 from figsoda/zip-permissions
fix: respect file permissions when compressing zip files
2022-09-16 18:46:57 -03:00
figsoda
0519b5663e fix: respect file permissions when compressing zip files 2022-09-01 16:17:29 -04:00
figsoda
1f8cbdd360 fix: incorrect warnings for decompression 2022-09-01 14:27:12 -04:00
Vinícius Miguel
99ec7d2cf2
Fix wrong filename suggestions when compressing folders into non-archives (#269) 2022-08-22 23:37:04 -03:00
figsoda
996e597c1f fix: apply clippy lint 2022-08-14 12:32:54 +08:00
figsoda
a1c943923c refac: simplify smart_unpack to remove redundant code and make clippy happy 2022-08-14 12:24:41 +08:00
João M. Bezerra
86234084ab refac: use Lazy cell to optimize env::current_dir call 2022-08-12 13:03:48 -03:00
Dan Martinez
39ea378cc5 Fix the decompress -d argument description 2022-08-11 14:29:23 -07:00
João M. Bezerra
7ed3a16f21 chore: update rustfmt config
remove 'force_multiline_blocks' config
2022-07-04 11:06:16 -03:00
João M. Bezerra
2e165e57cb fix rustdoc lint warnings 2022-06-05 12:52:20 -03:00
João M. Bezerra
801189ec02 create is_running_in_accessible_mode helper
also renamed some variables
2022-06-04 21:38:16 -03:00
João M. Bezerra
278bc980c1 small changes and rewrite zip warning message 2022-06-04 14:36:57 -03:00
João M. Bezerra
97c4387fcf minor simplifications and renamings 2022-06-04 14:04:31 -03:00
João M. Bezerra
14025c6816 remove use_small_heuristics = "Max" from rustfmt
and update edition to 2021
2022-06-04 13:06:52 -03:00
João M. Bezerra
f5fcf7f2a3 replace flat_map by flatten_compression_formats 2022-06-04 13:01:24 -03:00
João M. Bezerra
19769223c8 create helper function split_first_extension 2022-06-04 12:55:51 -03:00
João M. Bezerra
4d518b7056 small refactor and renamings 2022-06-04 12:47:17 -03:00
João M. Bezerra
8bd78f49cd fix accessible warning if reversed 2022-06-04 11:46:59 -03:00
João M. Bezerra
c65959d648 break down commands.rs into multiple files 2022-06-04 11:46:23 -03:00
João M. Bezerra
eac0a0687a fix clippy warnings 2022-06-04 10:59:51 -03:00
Artturin
2b53db9bdd fix clippy warning
https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
2022-06-01 17:40:57 +03:00
João Marcos Bezerra
45a456f127
Merge branch 'master' into fix-zip-warning 2022-03-02 20:32:45 -03:00
Jan Christian Grünhage
abca371dcc fix: remove single quotes from clap doc comments
Apparently, clap_complete doesn't properly escape single quotes in doc
comments, leading to broken shell completions for zsh. To circumvent
this, I've removed the single quote in the one place where it shouldn't
have been in the first place ("it's" vs "its", contraction vs possessive
pronoun), and replaced "it's" with "it is" in the other place.

Reference to upstream issue: https://github.com/clap-rs/clap/issues/1596
2022-02-13 10:36:06 +01:00
Vinícius R. Miguel
7dd016aa54 feat: recover last modified time when unpacking zip archives 2022-02-05 23:08:21 -03:00
Vinícius Miguel
8b1cd18fb5
feat: don't allocate when possible in to_utf, nice_directory_display (#249) 2022-02-05 12:31:20 -03:00
João M. Bezerra
26138e0f06 Reuse zip warning message 2022-02-03 18:00:02 -03:00
João Marcos Bezerra
1a1449a569
Merge branch 'master' into fix-zip-warning 2022-02-03 16:12:14 -03:00
João M. Bezerra
923a0601eb Update compress_files docs 2022-02-03 16:02:48 -03:00
Vinícius Miguel
336fc97831
feat: allow ignoring hidden files and files matched by .gitignore files (#245) 2022-01-16 23:30:26 -03:00
João Marcos Bezerra
7a7c6b64fb
Merge pull request #240 from Crypto-Spartan/update-clap-3.0.4
Update clap to v3.0.4
2022-01-16 22:44:20 -03:00
Vinícius Miguel
bf9e6b7b98
feat: use Cow<'static, str> in FinalError (#246) 2022-01-16 18:35:53 -03:00
Vinícius Miguel
6fc6d23872
fix: missing #[must_use] attribute on a method returning Self (#243) 2022-01-15 16:14:23 -03:00
Crypto-Spartan
56f11424dc
remove lib.rs and move contents to main.rs (#241) 2022-01-13 15:13:12 -03:00
Crypto-Spartan
8ae774ceff add 'about' info (Cargo.toml descripion value) to help message 2022-01-05 21:55:26 +00:00
Crypto-Spartan
e816ec1f8f use rustfmt 2022-01-04 23:01:32 +00:00
Crypto-Spartan
fa2af20814 fix warning for zip with additional formats 2022-01-04 22:45:24 +00:00
Lovecraftian Horror
0b688fa70c Make yes, no, and accessible flags global 2021-12-29 14:15:30 -06:00
João Marcos Bezerra
308b8f7e90
Merge pull request #225 from sigmaSd/list
List command: print file immediatly after it is processed
2021-12-20 13:11:15 -03:00
Nbiba Bedis
3ce9927e2b Show progress when using list --tree 2021-12-20 11:22:52 +01:00
Nbiba Bedis
40bb56bf79 Mark files as directories when compressing to zip regardless if they're empty or not 2021-12-14 09:18:16 +01:00
João Marcos Bezerra
35a158ec63
Merge pull request #229 from sigmaSd/ux
Actually use relative paths when extracting
2021-12-13 22:43:14 -03:00
sigmaSd
a3d3e5d1d9
Truncate long messages in the progress bar (#214)
* Truncate long messages in the progress bar
2021-12-13 22:40:52 -03:00
Crypto-Spartan
add6a595bd
Merge pull request #227 from Crypto-Spartan/question-continue
remove redundant user_wants_to_continue function
2021-12-09 18:21:32 -03:00
João Marcos Bezerra
f40f40cda0
Merge pull request #226 from Crypto-Spartan/eprint-fix
simple eprintln fixes
2021-12-09 17:53:13 -03:00
Nbiba Bedis
42bcc024d4 Actually use relative paths when extracting 2021-12-09 17:59:25 +01:00
Nbiba Bedis
19081caa70 Rebase 2021-12-09 09:37:23 +01:00
Nbiba Bedis
47462ba40d Rebase 2021-12-09 09:34:07 +01:00
Nbiba Bedis
569f39c6c9 Use a new thread for listing 2021-12-09 09:28:44 +01:00
Nbiba Bedis
b1667bd474 Remove comment 2021-12-09 08:24:49 +01:00
Nbiba Bedis
a07bc72faf Show info for list --tree 2021-12-09 08:24:49 +01:00
Nbiba Bedis
2adcfb364f List command: print file immediatly after it iss processed 2021-12-09 08:24:49 +01:00
João Marcos Bezerra
9c3446924c
Merge pull request #224 from sigmaSd/sym
Ignore broken symlinks when compressing
2021-12-09 01:06:34 -03:00
Crypto-Spartan
cd0a58d27e simple eprintln! fixes 2021-12-08 18:25:41 +00:00
Nbiba Bedis
734ffd4331 Compile on stable 2021-12-08 11:58:02 +01:00
Nbiba Bedis
34c09d5d69 Ignore broken symlinks when compressing 2021-12-08 11:46:30 +01:00
João M. Bezerra
775e92c52e Add redundant check for --yes and --no flags conflict
Should be covered by clap, but we're double checking it now
2021-12-08 00:26:05 -03:00
João Marcos Bezerra
fddc79628a
Merge pull request #215 from figsoda/snappy
support snappy format
2021-12-08 00:17:59 -03:00
João Marcos Bezerra
9e435b7026
Merge pull request #219 from Crypto-Spartan/fix-hint-suggestion
Fix the hint suggestion for compressing multiple files
2021-12-07 23:55:11 -03:00
João M. Bezerra
250d2e231c Reformat code 2021-12-07 23:25:21 -03:00
Crypto-Spartan
7703d12af2 Fix the hint suggestion for compressing multiple files 2021-12-07 23:20:53 +00:00
Crypto-Spartan
17d9f17277 Ask user to continue after .zip warning is shown 2021-12-07 21:40:03 +00:00
Crypto-Spartan
f8acb61777 Fix inconsistent zip compression and decompression memory usage warnings 2021-12-07 21:01:43 +00:00
figsoda
52a8acf2e1 support snappy format 2021-12-07 13:59:56 -05:00
Nbiba Bedis
0976970e8c Add progress bar for compressing/decompressing 2021-11-25 11:57:47 +01:00
João M. Bezerra
b31f407011 Reformat code 2021-11-24 23:45:12 -03:00
João M. Bezerra
4e0dbeb85b Merge branch 'accessibility' 2021-11-24 23:39:00 -03:00
Anton Hermann
437b0c42ff Make ZIP comment show in accessibility mode 2021-11-23 18:43:21 +01:00
Anton Hermann
1030eb0de9 Improve accessibility code and comment decisions why some info is (in)accessible 2021-11-23 11:53:20 +01:00
Anton Hermann
34cbe5746d Fix 40cee89: include review 2021-11-22 01:40:42 +01:00
Nbiba Bedis
ba617fdea8 Make logging consistant for zip 2021-11-16 09:39:10 +01:00
Nbiba Bedis
a87b89073e Document unwrap safety 2021-11-16 09:32:01 +01:00
Nbiba Bedis
4fc49b63cc Assert that output_dir exists in decompress_fn as well 2021-11-16 09:23:40 +01:00
João Marcos Bezerra
1c52dc5ee4
Assert that output_dir exists 2021-11-15 13:05:46 -03:00
Nbiba Bedis
c0b37c117c Add comment 2021-11-15 11:37:32 +01:00
Nbiba Bedis
9e41712f44 Smart unpack archives 2021-11-15 11:31:29 +01:00
João Marcos Bezerra
ed68e17eb8
Merge pull request #206 from sigmaSd/refactor
Simplify decompress function
2021-11-14 15:44:09 -03:00
Nbiba Bedis
b0ab145162 Add comment 2021-11-14 19:12:46 +01:00
Nbiba Bedis
11ee27ea25 Ask to overwrite if the user specified dir exists 2021-11-14 19:06:49 +01:00
João Marcos Bezerra
3b8333a063
Merge pull request #193 from sigmaSd/ub
Skip compressing file if its the same file as the output
2021-11-14 14:03:39 -03:00
Nbiba Bedis
85968ea841 Simplify decompress function 2021-11-14 17:59:40 +01:00
Nbiba Bedis
3e52eb6deb use fs_err canonicalize 2021-11-14 07:21:54 +01:00
João Marcos Bezerra
92372813a5
Fix error with format infer 2021-11-14 02:14:51 -03:00
João Marcos Bezerra
fe4b265d9f
Merge branch 'master' into infer2 2021-11-14 02:11:28 -03:00
Vinícius Rodrigues Miguel
afc8367230 Simplify (optimize?) several file inferring functions 2021-11-14 01:53:59 -03:00
Nbiba Bedis
08b2314d8f display xz when inferring lzma 2021-11-13 17:13:51 +01:00
Nbiba Bedis
0660c2fe59 Remove Lzip because its incorrect, and improve extention comparison 2021-11-13 09:46:08 +01:00
Anton Hermann
40cee89bab Implement accessibility mode which reduces visual noise 2021-11-13 01:47:08 +01:00
Anton Hermann
c1add95e70 Fix warnings in doc comments
Escape square brackets comments containing "[INFO]", "[WARNING]", "[ERROR]"

Suppress automatic link markup warning
2021-11-13 00:07:17 +01:00
Nbiba Bedis
28b512ae3f Skip compressing file if its the same file as the output 2021-11-12 11:51:44 +01:00
João Marcos Bezerra
6147d13259
Add missing period 2021-11-11 11:32:36 -03:00
figsoda
6d393b3c97 add link to github to help message 2021-11-11 09:15:59 -05:00
João Marcos Bezerra
180f63209a
Merge pull request #190 from SpyrosRoum/fix-decompressing-failing-to-create-dir
Fix not overwriting files/dirs when trying to create a directory
2021-11-11 11:08:41 -03:00
João Marcos Bezerra
6a56e1ca46
Merge pull request #189 from figsoda/help-supported-formats
add supported formats to help message
2021-11-11 11:04:07 -03:00
Spyros Roum
c33d896743 Change clear_path to return Result<bool>
So `Ok(true)` means the path is clear while `Ok(false)` means the user doesn't want to overwrite
2021-11-11 15:58:51 +02:00
Spyros Roum
d1d781dded Clear path before creating a dir 2021-11-11 11:36:40 +02:00
Spyros Roum
eb9a99fff3 Create util for clearing a path 2021-11-11 11:36:26 +02:00
figsoda
043a04bf51 add supported formats to help message 2021-11-10 22:04:00 -05:00
figsoda
5616231af9 simplify colors 2021-11-10 21:59:07 -05:00
figsoda
1fb9ef5abc remove trailing blank lines in error messages 2021-11-10 21:56:04 -05:00
João M. Bezerra
162e1c1259 Fix error message panic when cannot list non-archive files 2021-11-10 20:24:57 -03:00
João M. Bezerra
05d83a3726 Utf8 checks, using references and avoid allocating
And add docs
2021-11-10 19:59:36 -03:00
João M. Bezerra
f1c0c82323 Move utf8 utils from zip.rs to utils module 2021-11-10 19:47:36 -03:00
João M. Bezerra
ed0e225219 Improve error message for Zip invalid encoding errors
And refactor function implementations
2021-11-10 19:45:27 -03:00
João M. Bezerra
b7c6589864 Small docs update 2021-11-10 10:09:54 -03:00
João M. Bezerra
f09f1cecba Merging dialogs.rs with question.rs 2021-11-10 09:57:51 -03:00
João M. Bezerra
a531d44e2b Move colors module to it's own file 2021-11-10 09:55:44 -03:00
João M. Bezerra
63cfeb26ef Add accidentally removed link in docs 2021-11-10 09:52:20 -03:00
João M. Bezerra
d27e259b26 Reorganizing src/utils, by renaming submodules
And moving formatting stuff out of fs.rs
2021-11-10 09:51:26 -03:00
João Marcos Bezerra
1579a482e8
Fix typo
DeMorgan's laws apply to disjunctions, not implications.
2021-11-10 09:06:09 -03:00
João Marcos Bezerra
1026fa19fd
Merge pull request #154 from sigmaSd/infer
Infer file extension when decompressing
2021-11-10 06:40:54 -03:00
João M. Bezerra
cbc87866fa Fix zip magic numbers detection
And reworked detection for other formats as well
2021-11-10 06:34:05 -03:00
João M. Bezerra
16acb98b6e Early return when can't detect extension from magic numbers 2021-11-10 06:04:31 -03:00
João M. Bezerra
552096acf0 Minor import and module exporting changes 2021-11-10 06:03:46 -03:00
Nbiba Bedis
266cf6e27a Infer file extension when decompressing 2021-11-10 05:41:44 -03:00
figsoda
dedd254ace switch from lz4_flex to lzzzz, enable lz4 tests 2021-11-09 21:26:04 -05:00
João Marcos Bezerra
abf1d4e3e4
Readme update (#161)
* Updating badges

* Reformatted support table to be monospaced

* Add first benchmark to the readme

And fixed a typo

* Some readme rewording

* Removing readme redundant compression example

* Change badges to have squared corners

* readme: increase headers size by one

* Slight modifications to the README

* Specify dependencies and tweak some other stuff

* Add MSRV

Co-authored-by: Vinícius Miguel <36349314+vrmiguel@users.noreply.github.com>
2021-11-06 01:29:56 -04:00
Vinícius Miguel
43fb274956
Optimize strip_cur_dir (#167) 2021-11-05 23:49:35 -04:00
Vinícius Miguel
739a52f00e
Refactor utils into a module (#166) 2021-11-05 22:04:00 -04:00
João Marcos Bezerra
d1988b4ba2
Remove import comments 2021-11-04 01:08:09 -03:00
Vinícius Rodrigues Miguel
e81fafc3d3 Make Extension non-exhaustive 2021-11-03 18:08:39 -03:00
Vinícius Rodrigues Miguel
75ece05dbf Avoid allocating in nice_directory_display when possible 2021-11-03 18:08:22 -03:00
João Marcos Bezerra
2af0464ed3
Merge pull request #153 from figsoda/typo
Fix zsh shell completions
2021-11-03 13:15:40 -03:00
Vinícius Rodrigues Miguel
a798d20106 extension: Use hardcoded slices instead of Vecs when creating an Extension 2021-11-03 12:35:29 -03:00
figsoda
cd84161b28 fix typo 2021-11-02 18:51:33 -04:00
João Marcos Bezerra
a1c4f0373f
Merge pull request #150 from figsoda/lz4
Add support for lz4
2021-11-02 18:45:53 -03:00
figsoda
27d8e64192 minor improvements 2021-11-02 17:37:24 -04:00
figsoda
296826b4d3 add support for lz4 format 2021-11-02 17:37:24 -04:00
João M. Bezerra
75142f14b9 Fix short flag for the --dir flag 2021-11-02 18:27:46 -03:00
João M. Bezerra
5059f9c875 Perform exhaustive matching on error variants
Fixes #29
2021-11-02 17:44:13 -03:00
João M. Bezerra
27b6970eda Updating rustfmt 2021-11-02 16:15:36 -03:00
João M. Bezerra
9a9488fcd2 Merge branch 'command_list' 2021-11-02 15:31:01 -03:00
João Marcos Bezerra
73c1d9a41c
Merge pull request #141 from SpyrosRoum/fix-decompression-overwritting-files-without-asking
Fix decompression overwritting files without asking and failing on directories
2021-11-02 08:58:31 -03:00
Spyros Roum
7f5ff0faf1 Fix archives panicking when asked to overwrite file 2021-11-02 13:34:38 +02:00
Spyros Roum
547b8c91e5 Extract function 2021-11-02 13:34:04 +02:00
João Marcos Bezerra
e4e1d6a565
Merge pull request #140 from ouch-org/improving-error-treatment
Improving error messages and removing dead error treatment code
2021-11-02 07:41:19 -03:00
Spyros Roum
8ef1b25b12 Ask to overwrite dirs when decompressing archives 2021-11-02 12:38:10 +02:00
João M. Bezerra
2fcec33ec6 Removing obsolete error variants 2021-11-02 07:36:17 -03:00
João Marcos Bezerra
df3bb3b72b
Simplify cli canonicalize implementation 2021-11-02 07:21:03 -03:00
João M. Bezerra
5c0f24f567 Change alignment of error message replacement suggestion 2021-11-02 06:30:59 -03:00
João M. Bezerra
21134aaeff Improve message when no extensions given to compress file 2021-11-02 06:28:55 -03:00
João M. Bezerra
047102ec07 Remove InternalError, replaced by unreachable! macro 2021-11-02 06:28:40 -03:00
João M. Bezerra
fadc412896 Improve error message when no extensions given to decompress
Fixes #137
2021-11-02 06:13:24 -03:00
Spyros Roum
70c81ed8a4 Fix non-archives overwriting files without asking and error-ing on dirs 2021-11-02 10:58:58 +02:00
João M. Bezerra
6cebf78da6 Simplify Error::Custom code conversions 2021-11-02 05:18:34 -03:00
João M. Bezerra
d2d4a929e1 Docs improvements
+ Removed some dead code
2021-11-02 04:57:26 -03:00
João M. Bezerra
15e922b7ba Fixing some Extension tests 2021-11-02 01:16:42 -03:00
João Marcos Bezerra
75cad36c5c
Merge branch 'master' into Remove-tar-combinations-from-CompressionFormat 2021-11-02 01:00:18 -03:00
Anton Hermann
8527616729 FIX 9919c72: add doc comment, remove accidentally doubled is_archive() 2021-11-01 12:40:30 +01:00
Anton Hermann
9919c72347 Merge branch 'master' into command_list 2021-11-01 12:32:55 +01:00
Anton Hermann
cabb4f03bf list: add comments 2021-11-01 12:15:56 +01:00
Anton Hermann
e8f24b7178 list: highlight directories (either coloring them or adding a /) 2021-11-01 12:15:36 +01:00
Anton Hermann
5421a5db77 Implement tree output for 'list' command 2021-11-01 08:53:18 +01:00
Anton Hermann
30ebcf4f9e Implement command 'list' to show archive contents 2021-11-01 08:53:03 +01:00
Spyros Roum
4921d3d3d2 Add Extension wrapper that lets us keep tgz instead of forcing tar.gz 2021-11-01 01:09:37 +02:00
João M. Bezerra
d9e0b4c5fb Fixing documentation conflicting with build.rs 2021-10-31 12:57:30 -03:00
Spyros Roum
604616e042 Use proper match with no wildcard when detecting if it's archive 2021-10-31 11:09:35 +02:00
João M. Bezerra
20e0067cad Adding docs in new files and functions 2021-10-31 03:21:52 -03:00
João Marcos Bezerra
95d38e99f6 Merge branch 'master' into issue-32 2021-10-31 03:01:41 -03:00
João Marcos Bezerra
9b7b863e94
Merge branch 'master' into master 2021-10-31 02:41:43 -03:00
João M. Bezerra
a85eb68a60 Merge branch 'pr/completions-manpage' 2021-10-31 02:23:21 -03:00
João M. Bezerra
77873cde15 Merge branch 'pr/fix-archive-format-detection' 2021-10-31 01:59:41 -03:00
João M. Bezerra
4e731f8af3 Merge branch 'dir-flag' 2021-10-31 01:49:33 -03:00
figsoda
614f2aa6d5
Merge branch 'master' into completions-manpage 2021-10-30 16:59:24 -04:00
Gabriel Simonetto
7c82f2b3b7 Make remaining modules public in order to gain the documentation check 2021-10-30 17:00:07 -03:00
Gabriel Simonetto
704a4efdd7 Merge branch 'master' into issue-56 2021-10-30 11:31:09 -03:00
João M. Bezerra
d1c905cda4 Improving permission denied error message 2021-10-30 11:17:38 -03:00
João M. Bezerra
6c6f721f35 Solved FinalError compile errors 2021-10-30 11:17:38 -03:00
Gabriel Simonetto
09b050d836 Introduce fs_err as a replacement for fs 2021-10-30 11:17:38 -03:00
Santo Cariotti
09c2830190 feat: print number of unpacked files 2021-10-29 19:21:17 +02:00
Santo Cariotti
2d84686b25 feat: write only one time the info on stdout 2021-10-29 19:14:16 +02:00
Gabriel Simonetto
70b787b58e Fix repo link on documentation 2021-10-27 00:08:26 -03:00
Gabriel Simonetto
0fdef287c4 Warn for missing docs, and add necessary docs 2021-10-27 00:08:00 -03:00
Spyros Roum
6b6ade8c9a Break down tgz, tbz, etc to tar + gz/bz 2021-10-22 14:49:32 +03:00
Spyros Roum
caca7901c4 Run cargo fmt 2021-10-22 14:47:44 +03:00
Spyros Roum
02657ee5bc Remove the variants from CompressionFormat 2021-10-22 14:46:54 +03:00
Spyros Roum
bdf5090844 zst is not an archive format.. 2021-10-22 02:21:31 +03:00
figsoda
d6054ba3ee move QuestionPolicy to lib 2021-10-21 19:13:29 -04:00
Spyros Roum
91a1054c3c Remove duplicated if/else branches 2021-10-22 02:05:38 +03:00
Spyros Roum
0f3bc4f444 Use the new method were applicable 2021-10-22 02:04:55 +03:00
Spyros Roum
340827de1f Introduce is_archive_format method on CompressionFormat 2021-10-22 02:00:11 +03:00
figsoda
2816b837e2
Merge branch 'master' into completions-manpage 2021-10-21 18:57:24 -04:00
Anton Hermann
10f7462b8b Introduce new type for policy on how to handle questions 2021-10-21 23:31:53 +02:00
figsoda
7efac2e55d generate completions 2021-10-20 22:18:39 -04:00
João Marcos Bezerra
e17eb9595e Merge branch 'master' into migrate-to-clap 2021-10-20 14:04:19 -03:00
TATSUNO Yasuhiro
4404b91a23
refactoring: Extract function (#116) 2021-10-20 01:10:10 -03:00
TATSUNO Yasuhiro
5f7d777342
Change display of current directory (#119) 2021-10-20 00:57:11 -03:00
khubo
d9196f997f change output flag to dir flag 2021-10-20 08:38:06 +05:30
TATSUNO Yasuhiro
b8a2c3899e Use a same term as in command 2021-10-20 10:54:14 +09:00
Spyros Roum
7b758c0ffb Remove author's names from help message 2021-10-19 19:56:52 +03:00
Spyros Roum
7fb4398c04 Remove redundant code 2021-10-19 19:56:27 +03:00
TATSUNO Yasuhiro
2e6cd893dc
Omit "./" at the start of the path (#109) 2021-10-19 12:57:11 -03:00
Spyros Roum
e24c9ce931 Replace oof with clap 2021-10-19 14:42:07 +03:00
João Marcos Bezerra
9d7c8a9abb
Merge pull request #100 from figsoda/cleanup
Minor cleanups and refactors
2021-10-18 02:01:02 -03:00
figsoda
2feefb3ca3 minor cleanups 2021-10-17 18:02:32 -04: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
55466a314e
Merge pull request #99 from SpyrosRoum/Add-proper-error-for-conflicted-flags
Add proper error handling for conflicting flags
2021-10-15 11:26:44 -03:00
João Marcos Bezerra
d33dd7f445
Merge branch 'master' into Improve-FinalError 2021-10-15 11:23:25 -03:00
Spyros Roum
16ee513906 Replace todo! with an actual error 2021-10-15 17:21:35 +03:00
Spyros Roum
c44cdf1013 Enable nightly for unstable fmt feature and run cargo fmt 2021-10-15 17:11:44 +03:00
João M. Bezerra
15c54a615d Renaming NO_COLOR_IS_SET to DISABLE_COLORED_TEXT 2021-10-15 09:35:07 -03:00
Spyros Roum
702e7622db Run cargo fmt removing redundant braces 2021-10-15 14:49:05 +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
a739b5a482 Re-add "Compressing" output to Tar and make Tar and Zip compression use the info macro 2021-10-07 11:36:54 -03:00
Vinícius Rodrigues Miguel
d4862e2b6f test: check the resulting compressed files through MIME types 2021-10-06 23:54:20 -03:00
Vinícius Rodrigues Miguel
89271d465f extension: fix .bz2 being inferred to Gzip 2021-10-06 23:53:34 -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 Rodrigues Miguel
40410840c9 error: add MissingArgumentsForDecompression 2021-10-06 15:55:13 -03:00
Vinícius Rodrigues Miguel
990458b771 Release 0.2.0 2021-10-06 15:39:55 -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
3f718b8335 Simplify tests by making gen_args more generic 2021-10-05 22:21:11 -03:00
João Marcos Bezerra
4ddc21a551
Merge pull request #61 from GabrielSimonetto/issue-48
Make the "decompress" command explicit
2021-10-05 22:10:27 -03:00
Gabriel Simonetto
788809b8f3 Make decompress command explicit
- No subcommand given now calls the help menu
- Also added docs for the short version of compress and decompress
2021-10-05 22:06:18 -03:00
Vinícius Rodrigues Miguel
e7dd6f2d4f Don't use colors when stdout or stderr are being redirected 2021-10-05 21:12:15 -03:00
João M. Bezerra
f7139548f6 Switch from BTree to Hash collections 2021-10-05 18:10:28 -03:00
João M. Bezerra
2f5083278f Add libc dependency
Cross compatible (with windows) exit failure code
2021-10-03 00:20:12 -03:00
João M. Bezerra
89d1e6a752 Document modules 2021-10-03 00:17:57 -03:00
Gabriel Simonetto
e352f8bc93 Allow empty dirs on tar 2021-10-02 17:33:16 -03:00
Gabriel Simonetto
0c65fbd2d4 Allow empty dirs on zip 2021-10-02 17:14:16 -03:00
Vinícius Rodrigues Miguel
df062f4155 zip: optimize UTF-8 checks on Unix, remove unneeded Clone 2021-10-01 19:13:43 -03:00
Vinícius Rodrigues Miguel
17d8959a0f unix: if setting permission fails, return an error instead of panicking 2021-10-01 12:00:52 -03:00