From beb11773f6ac17d0b97f908311ac5989e1a0a5ae Mon Sep 17 00:00:00 2001 From: Rory Dudley Date: Sun, 31 Mar 2024 00:53:56 -0600 Subject: Document aliases in the docstring for lookup() Add documentation for anthology::lookup(), with a list containing all the default aliases for builtin commands. --- src/poem/anthology.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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 { let verb = match verb { "quit" => "exit", // Alias 'quit' to 'exit' -- cgit v1.2.3