summaryrefslogtreecommitdiffstats
path: root/src/poem/anthology.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/poem/anthology.rs')
-rw-r--r--src/poem/anthology.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/poem/anthology.rs b/src/poem/anthology.rs
index 7766f62..8ff70f9 100644
--- a/src/poem/anthology.rs
+++ b/src/poem/anthology.rs
@@ -3,12 +3,13 @@ mod cd;
mod exit;
mod export;
mod source;
+mod which;
use crate::compose::Environment;
use crate::poem::Verse;
/// A static list of all the built-in commands
-static INDEX: [&str; 7] = [
- "alias", "cd", "exit", "export", "source", "unalias", "unset",
+static INDEX: [&str; 8] = [
+ "alias", "cd", "exit", "export", "source", "unalias", "unset", "which",
];
/// Lookup the index of a built-in command
@@ -53,6 +54,7 @@ pub fn incant(verse: &Verse, out: &mut Vec<u8>, index: usize, env: &mut Environm
"source" => source::incant(verse, out, env),
"unalias" => alias::unincant(verse, &mut env.aliases),
"unset" => export::unincant(verse),
+ "which" => which::incant(verse, out, env),
_ => unreachable!(),
}
}