pub struct BashCompletionInput { /* private fields */ }Expand description
BashCompletionInput is a struct which contains input data passed from the shell into a completion script. Data within this struct should be used by a completion script to determine appropriate completion options.
Implementations§
Trait Implementations§
Source§impl CompletionInput for BashCompletionInput
impl CompletionInput for BashCompletionInput
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
Source§fn complete_subcommand<'a, T>(&self, subcommands: T) -> Vec<String>where
T: IntoIterator<Item = &'a str>,
fn complete_subcommand<'a, T>(&self, subcommands: T) -> Vec<String>where
T: IntoIterator<Item = &'a str>,
Given a list of subcommands, filter any that match the current word
Source§fn complete_directory(&self) -> Vec<String>
fn complete_directory(&self) -> Vec<String>
Get directory completions based on the current word
Source§fn complete_file(&self) -> Vec<String>
fn complete_file(&self) -> Vec<String>
Get file completions based on the current word
Also returns directories because the user may be entering a file within that directory
Auto Trait Implementations§
impl Freeze for BashCompletionInput
impl RefUnwindSafe for BashCompletionInput
impl Send for BashCompletionInput
impl Sync for BashCompletionInput
impl Unpin for BashCompletionInput
impl UnwindSafe for BashCompletionInput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more