diff --git a/src/command/kill.rs b/src/command/kill.rs new file mode 100644 index 0000000..bc8b1a2 --- /dev/null +++ b/src/command/kill.rs @@ -0,0 +1,17 @@ +#[derive(Default)] +pub struct KillCommand { + target: Option +} + +impl KillCommand { + pub fn target(mut self, target: super::Selector) -> Self { + self.target = Some(target); + self + } + + pub fn build(self) -> super::Command { + let target = self.target.unwrap_or(super::Selector::Executor); + let s = format!("kill {target}"); + super::Command(s) + } +} \ No newline at end of file