diff options
author | Toby Vincent <tobyv@tobyvin.dev> | 2024-01-29 02:22:15 -0600 |
---|---|---|
committer | Toby Vincent <tobyv@tobyvin.dev> | 2024-01-29 02:22:31 -0600 |
commit | d749e1cb17744493c7a9e43e971518c8b12235b7 (patch) | |
tree | f2eacab0d366fb8431d564591a9aad35824425cf /src/main.rs | |
parent | dcfd85099c9d136afc3f22dcde90583694e3d4f3 (diff) |
feat: reimplement exclude option
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 365d42a..0559985 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,6 +11,10 @@ pub struct Config { /// Tmux socket name #[arg(short, long, default_value = "ssh")] pub socket: String, + + /// Exclude host from output (can be specified multiple times) + #[arg(short, long)] + pub exclude: Vec<sshr::Host>, } #[tokio::main] @@ -24,7 +28,7 @@ async fn main() -> Result<(), std::io::Error> { drop(tx); - let mut output = HashSet::new(); + let mut output: HashSet<sshr::Host> = HashSet::from_iter(config.exclude.into_iter()); let mut stdout = stdout(); while let Some(host) = rx.recv().await { |