From 759e9d3d71a6262fe0680ae0156d967f1e23b836 Mon Sep 17 00:00:00 2001 From: Jonas Maier <> Date: Thu, 5 Mar 2026 13:59:44 +0100 Subject: started "type" builtin, realized there is not enough context available --- src/run/builtin.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/run') diff --git a/src/run/builtin.rs b/src/run/builtin.rs index c778794..ea7651b 100644 --- a/src/run/builtin.rs +++ b/src/run/builtin.rs @@ -107,3 +107,24 @@ impl Builtin for from { Ok(()) } } + +pub struct _type; +impl Builtin for _type { + fn name(&self) -> &str { + "type" + } + + fn io( + &self, + args: &[BString], + _stdin: &mut dyn Read, + stdout: &mut dyn Write, + ) -> std::io::Result<()> { + for arg in args { + let kind = todo!(); + writeln!(stdout, "{} is {}", String::from_utf8_lossy(arg), kind)?; + } + + Ok(()) + } +} -- cgit v1.2.3