summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRory Dudley2024-03-31 00:53:56 -0600
committerRory Dudley2024-03-31 00:53:56 -0600
commitbeb11773f6ac17d0b97f908311ac5989e1a0a5ae (patch)
tree4a08bf46d881fe1e4954ddd8e90344d789638b20
parent791b61f97e3ee12dfd765f5e23edd5df527eb803 (diff)
downloaddwarvish-beb11773f6ac17d0b97f908311ac5989e1a0a5ae.tar.gz
Document aliases in the docstring for lookup()
Add documentation for anthology::lookup(), with a list containing all the default aliases for builtin commands.
-rw-r--r--src/poem/anthology.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/poem/anthology.rs b/src/poem/anthology.rs
index 9a0d2e4..e48e6c6 100644
--- a/src/poem/anthology.rs
+++ b/src/poem/anthology.rs
@@ -14,6 +14,10 @@ static INDEX: [&str; 7] = [
/// Lookup the index of a built-in command
///
/// Looks up the index of a built-in command in [INDEX], accounting for aliases.
+///
+/// # Aliases
+/// * quit -> exit
+/// * set -> export
pub fn lookup(verb: &str) -> Option<usize> {
let verb = match verb {
"quit" => "exit", // Alias 'quit' to 'exit'