mirror of
https://github.com/timvisee/ffsend.git
synced 2025-10-06 10:39:57 +02:00
Implement quiet CLI flag, only report URLs for history with quiet
This commit is contained in:
parent
3ea774e227
commit
5ac3cd4b15
4 changed files with 64 additions and 41 deletions
|
@ -71,6 +71,11 @@ impl<'a: 'b, 'b> MainMatcher<'a> {
|
|||
self.matches.is_present("incognito") || env_var_present("FFSEND_INCOGNITO")
|
||||
}
|
||||
|
||||
/// Check whether quiet mode is used.
|
||||
pub fn quiet(&self) -> bool {
|
||||
!self.verbose() && (self.matches.is_present("quiet") || env_var_present("FFSEND_QUIET"))
|
||||
}
|
||||
|
||||
/// Check whether verbose mode is used.
|
||||
pub fn verbose(&self) -> bool {
|
||||
self.matches.is_present("verbose") || env_var_present("FFSEND_VERBOSE")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue