summaryrefslogtreecommitdiff
path: root/src/cmds/comp/sheetedit.rs
blob: d2100287d7fdc7260b1dfeb902053e1b049dd340 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use cli_utils::string_vec;

use crate::systems::comp::context::CompletionContext;

pub fn comp(ctx: CompletionContext) -> Option<Vec<String>> {
    if ctx.current_word.starts_with('-') {
        return Some(string_vec!["-e", "--editor"]);
    }

    if ctx.previous_word == "-e" || ctx.previous_word == "--editor" {
        return Some(vec![]);
    }

    None
}