mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-06 19:45:29 +00:00
Better error message for MissingArgumentsForDecompression
This commit is contained in:
parent
8c88d5cb0f
commit
784217143a
@ -66,7 +66,10 @@ impl fmt::Display for Error {
|
|||||||
}
|
}
|
||||||
Error::MissingArgumentsForCompression => {
|
Error::MissingArgumentsForCompression => {
|
||||||
write!(f, "{} ", "[ERROR]".red())?;
|
write!(f, "{} ", "[ERROR]".red())?;
|
||||||
write!(f,"The compress subcommands demands at least 2 arguments, see usage: <TODO-USAGE>")
|
let spacing = " ";
|
||||||
|
writeln!(f,"The compress subcommands demands at least 2 arguments, an input file and an output file.")?;
|
||||||
|
writeln!(f,"{}Example: `ouch compress img.jpeg img.zip", spacing)?;
|
||||||
|
write!(f,"{}For more information, run `ouch --help`", spacing)
|
||||||
}
|
}
|
||||||
Error::InternalError => {
|
Error::InternalError => {
|
||||||
write!(f, "{} ", "[ERROR]".red())?;
|
write!(f, "{} ", "[ERROR]".red())?;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user