|
|
@ -42,7 +42,8 @@ impl fmt::Display for Usage
|
|
|
|
splash(f)?;
|
|
|
|
splash(f)?;
|
|
|
|
|
|
|
|
|
|
|
|
writeln!(f, "Usage: {} --send <bind> [SEND OPTIONS] <file...>", program_name())?;
|
|
|
|
writeln!(f, "Usage: {} --send <bind> [SEND OPTIONS] <file...>", program_name())?;
|
|
|
|
writeln!(f, "Usage: {} --recv <endpoint> [RECV OPTIONS] <output...>", program_name())?;
|
|
|
|
writeln!(f, "Usage: {} --recv <connect> [RECV OPTIONS] <output...>", program_name())?;
|
|
|
|
|
|
|
|
writeln!(f, "Usage: {} --help", program_name())?;
|
|
|
|
writeln!(f, "\nSEND OPTIONS:")?;
|
|
|
|
writeln!(f, "\nSEND OPTIONS:")?;
|
|
|
|
writeln!(f, " -e\t\t\tEncrypt file(s)")?;
|
|
|
|
writeln!(f, " -e\t\t\tEncrypt file(s)")?;
|
|
|
|
writeln!(f, " -c\t\t\tCompress files")?;
|
|
|
|
writeln!(f, " -c\t\t\tCompress files")?;
|
|
|
@ -58,3 +59,23 @@ impl fmt::Display for Usage
|
|
|
|
Ok(())
|
|
|
|
Ok(())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// The process parsed from command line
|
|
|
|
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
|
|
|
|
|
|
|
pub struct Process
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
/// The parsed config (includes mode)
|
|
|
|
|
|
|
|
pub config: config::Config,
|
|
|
|
|
|
|
|
/// The listed paths
|
|
|
|
|
|
|
|
pub paths: Vec<String>,
|
|
|
|
|
|
|
|
/// Use stdin/out
|
|
|
|
|
|
|
|
pub stdio: bool,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// An operation parsed from command line arguments
|
|
|
|
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
|
|
|
|
|
|
|
pub enum Op
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Process(Box<Process>),
|
|
|
|
|
|
|
|
Help,
|
|
|
|
|
|
|
|
}
|
|
|
|