pub trait CompletionInput: Sized {
    fn args(&self) -> Vec<&str>;
    fn arg_index(&self) -> usize;
    fn char_index(&self) -> usize;

    fn current_word(&self) -> &str { ... }
    fn previous_word(&self) -> &str { ... }
    fn complete_subcommand<'a, T>(&self, subcommands: T) -> Vec<String>
    where
        T: IntoIterator<Item = &'a str>
, { ... } fn complete_directory(&self) -> Vec<String> { ... } fn complete_file(&self) -> Vec<String> { ... } }

Required Methods§

Provided Methods§

Given a list of subcommands, print any that match the current word

Print directory completions based on the current word

Print file completions based on the current word Also returns directories because the user may be entering a file within that directory

Implementors§