mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-05 02:55:31 +00:00
typo: Decompressable -> Decompressible
This commit is contained in:
parent
08489b028c
commit
a47f41a257
@ -32,7 +32,7 @@ info: attempting to decompress input files into single_folder
|
||||
info: done!
|
||||
```
|
||||
|
||||
When no output file is supplied, `ouch` infers that it must decompress all of its input files. This will error if any of the input files are not decompressable.
|
||||
When no output file is supplied, `ouch` infers that it must decompress all of its input files. This will error if any of the input files are not decompressible.
|
||||
|
||||
#### Decompressing a bunch of files into a folder
|
||||
|
||||
@ -42,7 +42,7 @@ info: attempting to decompress input files into single_folder
|
||||
info: done!
|
||||
```
|
||||
|
||||
When the output file is not a compressed file, `ouch` will check if all input files are decompressable and infer that it must decompress them into the output file.
|
||||
When the output file is not a compressed file, `ouch` will check if all input files are decompressible and infer that it must decompress them into the output file.
|
||||
|
||||
#### Compressing files
|
||||
|
||||
@ -58,7 +58,7 @@ info: done!
|
||||
|
||||
```bash
|
||||
$ ouch -i some-file -o some-folder
|
||||
error: file 'some-file' is not decompressable.
|
||||
error: file 'some-file' is not decompressible.
|
||||
```
|
||||
|
||||
`ouch` might (TODO!) be able to sniff a file's compression format if it isn't supplied in the future, but that is not currently implemented.
|
||||
|
@ -63,7 +63,7 @@ impl TryFrom<clap::ArgMatches<'static>> for Command {
|
||||
|
||||
fn try_from(matches: clap::ArgMatches<'static>) -> error::OuchResult<Command> {
|
||||
// Possibilities:
|
||||
// * Case 1: output not supplied, therefore try to infer output by checking if all input files are decompressable
|
||||
// * Case 1: output not supplied, therefore try to infer output by checking if all input files are decompressible
|
||||
// * Case 2: output supplied
|
||||
|
||||
let output_was_supplied = matches.is_present("output");
|
||||
@ -98,14 +98,14 @@ impl TryFrom<clap::ArgMatches<'static>> for Command {
|
||||
|
||||
}
|
||||
else {
|
||||
// Checking if input files are decompressable
|
||||
// Checking if input files are decompressible
|
||||
let input_files = input_files
|
||||
.map(|filename| (filename, CompressionExtension::try_from(filename)));
|
||||
|
||||
for file in input_files.clone() {
|
||||
if let (file, Err(_)) = file {
|
||||
eprintln!("{}: file '{}' is not decompressable.", "error".red(), file);
|
||||
return Err(error::Error::InputsMustHaveBeenDecompressable(file.into()));
|
||||
// eprintln!("{}: file '{}' is not decompressible.", "error".red(), file);
|
||||
return Err(error::Error::InputsMustHaveBeenDecompressible(file.into()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@ pub enum Error {
|
||||
MissingExtensionError(String),
|
||||
InvalidUnicode,
|
||||
InvalidInput,
|
||||
InputsMustHaveBeenDecompressable(String)
|
||||
InputsMustHaveBeenDecompressible(String)
|
||||
}
|
||||
|
||||
// This should be placed somewhere else
|
||||
@ -26,8 +26,8 @@ impl fmt::Display for Error {
|
||||
Error::MissingExtensionError(filename) => {
|
||||
write!(f, "cannot compress to \'{}\', likely because it has an unsupported (or missing) extension.", filename)
|
||||
}
|
||||
Error::InputsMustHaveBeenDecompressable(file) => {
|
||||
write!(f, "file '{}' is not decompressable", file.red())
|
||||
Error::InputsMustHaveBeenDecompressible(file) => {
|
||||
write!(f, "file '{}' is not decompressible", file.red())
|
||||
}
|
||||
_ => {
|
||||
// TODO
|
||||
|
Loading…
x
Reference in New Issue
Block a user