diff options
| author | Jonas Maier <> | 2026-03-05 13:59:44 +0100 |
|---|---|---|
| committer | Jonas Maier <> | 2026-03-05 13:59:44 +0100 |
| commit | 759e9d3d71a6262fe0680ae0156d967f1e23b836 (patch) | |
| tree | 326abde5503f17ae6012a435b38c73d4b6247b60 /src/run | |
| parent | 66add60b315b2f04f4dc76560070c469a12fbdd6 (diff) | |
| download | pish-759e9d3d71a6262fe0680ae0156d967f1e23b836.tar.gz | |
started "type" builtin, realized there is not enough context available
Diffstat (limited to 'src/run')
| -rw-r--r-- | src/run/builtin.rs | 21 |
1 files changed, 21 insertions, 0 deletions
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(()) + } +} |
