diff options
| author | Jonas Maier <jonas@x77.dev> | 2026-03-06 13:15:27 +0100 |
|---|---|---|
| committer | Jonas Maier <jonas@x77.dev> | 2026-03-06 13:15:27 +0100 |
| commit | 65abf4e34102330fce919e933072eba9c45780f7 (patch) | |
| tree | a53057062fbff6b0bc30d467fd181f3e28cbcaf7 /src | |
| parent | 351edac110d2250c32047dd2a127903de352a81f (diff) | |
| download | pish-65abf4e34102330fce919e933072eba9c45780f7.tar.gz | |
history stub
Diffstat (limited to 'src')
| -rw-r--r-- | src/run/builtin.rs | 17 | ||||
| -rw-r--r-- | src/run/mod.rs | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/run/builtin.rs b/src/run/builtin.rs index e715bd7..26f90ad 100644 --- a/src/run/builtin.rs +++ b/src/run/builtin.rs @@ -160,3 +160,20 @@ impl Builtin for builtins { writeln!(stdout) } } + +pub struct history; +impl Builtin for history { + fn name(&self) -> &str { + "history" + } + + fn io( + &self, + _args: &[BString], + _stdin: &mut dyn Read, + stdout: &mut dyn Write, + ) -> std::io::Result<()> { + // TODO: add location & time to history to allow better querying + todo!("need session") + } +} diff --git a/src/run/mod.rs b/src/run/mod.rs index e97c377..5cc8149 100644 --- a/src/run/mod.rs +++ b/src/run/mod.rs @@ -178,6 +178,7 @@ const BUILTINS: &[&'static dyn Builtin] = &[ &builtin::from, &builtin::builtins, &builtin::_type, + &builtin::history, ]; pub struct CommandDispatch { |
