diff options
author | Rory Dudley | 2024-03-31 00:53:56 -0600 |
---|---|---|
committer | Rory Dudley | 2024-03-31 00:53:56 -0600 |
commit | beb11773f6ac17d0b97f908311ac5989e1a0a5ae (patch) | |
tree | 4a08bf46d881fe1e4954ddd8e90344d789638b20 /src/poem | |
parent | 791b61f97e3ee12dfd765f5e23edd5df527eb803 (diff) | |
download | dwarvish-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.
Diffstat (limited to 'src/poem')
-rw-r--r-- | src/poem/anthology.rs | 4 |
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' |