summaryrefslogtreecommitdiff
path: root/src/systems
diff options
context:
space:
mode:
Diffstat (limited to 'src/systems')
-rw-r--r--src/systems/comp.rs2
-rw-r--r--src/systems/comp/context.rs33
-rw-r--r--src/systems/render/renderer.rs2
3 files changed, 37 insertions, 0 deletions
diff --git a/src/systems/comp.rs b/src/systems/comp.rs
new file mode 100644
index 0000000..c7c6577
--- /dev/null
+++ b/src/systems/comp.rs
@@ -0,0 +1,2 @@
+pub mod _comps;
+pub mod context;
diff --git a/src/systems/comp/context.rs b/src/systems/comp/context.rs
new file mode 100644
index 0000000..36d1840
--- /dev/null
+++ b/src/systems/comp/context.rs
@@ -0,0 +1,33 @@
+use clap::{Parser, command};
+
+#[derive(Parser, Debug)]
+#[command(author, version, about, long_about = None)]
+pub struct CompletionContext {
+ /// The full command line
+ #[arg(short = 'f', long)]
+ pub command_line: String,
+
+ /// Cursor position
+ #[arg(short = 'C', long)]
+ pub cursor_position: usize,
+
+ /// Current word
+ #[arg(short = 'w', long)]
+ pub current_word: String,
+
+ /// Previous word
+ #[arg(short = 'p', long)]
+ pub previous_word: String,
+
+ /// Command name
+ #[arg(short = 'c', long)]
+ pub command_name: String,
+
+ /// Word index
+ #[arg(short = 'i', long)]
+ pub word_index: usize,
+
+ /// All words
+ #[arg(short = 'a', long, num_args = 1..)]
+ pub all_words: Vec<String>,
+}
diff --git a/src/systems/render/renderer.rs b/src/systems/render/renderer.rs
index dab4c23..13de8c6 100644
--- a/src/systems/render/renderer.rs
+++ b/src/systems/render/renderer.rs
@@ -60,3 +60,5 @@ macro_rules! r_println {
$result.println(&format!($($arg)*))
};
}
+
+include!("_override_renderers.rs");