aboutsummaryrefslogtreecommitdiff
path: root/crates/whirl_prompt/src/structure.rs
blob: 99143852e6bdd0daa0288cf714248689d3077534 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
// Copyright (C) 2021-2021 The Whirlsplash Collective
// SPDX-License-Identifier: GPL-3.0-only

pub struct Command {
  pub keyword: String,
  pub args:    Vec<String>,
}
impl Command {
  pub fn to_line(&self) -> String { format!("{} {}", self.keyword, self.args.join(" ")) }
}