aboutsummaryrefslogtreecommitdiffstats
path: root/src/run/builtin.rs
diff options
context:
space:
mode:
authorJonas Maier <>2026-03-05 13:59:44 +0100
committerJonas Maier <>2026-03-05 13:59:44 +0100
commit759e9d3d71a6262fe0680ae0156d967f1e23b836 (patch)
tree326abde5503f17ae6012a435b38c73d4b6247b60 /src/run/builtin.rs
parent66add60b315b2f04f4dc76560070c469a12fbdd6 (diff)
downloadpish-759e9d3d71a6262fe0680ae0156d967f1e23b836.tar.gz
started "type" builtin, realized there is not enough context available
Diffstat (limited to 'src/run/builtin.rs')
-rw-r--r--src/run/builtin.rs21
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(())
+ }
+}