summaryrefslogtreecommitdiff
path: root/src/cmds/comp/helpdoc.rs
blob: 7f07cad18d112587f52189a5c1cc33a9f04b9240 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::systems::{comp::context::CompletionContext, helpdoc};

pub fn comp(ctx: CompletionContext) -> Option<Vec<String>> {
    if ctx.previous_word == "helpdoc" {
        return Some(
            helpdoc::get_helpdoc_list()
                .iter()
                .map(|s| s.to_string())
                .collect(),
        );
    }
    None
}