diff options
Diffstat (limited to 'crates/whirl_prompt/src/structure.rs')
| -rw-r--r-- | crates/whirl_prompt/src/structure.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crates/whirl_prompt/src/structure.rs b/crates/whirl_prompt/src/structure.rs new file mode 100644 index 0000000..4603d37 --- /dev/null +++ b/crates/whirl_prompt/src/structure.rs @@ -0,0 +1,10 @@ +// Copyleft (ɔ) 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(" ")) } +} |