diff options
Diffstat (limited to 'mingling_core/src/asset/comp/suggest.rs')
| -rw-r--r-- | mingling_core/src/asset/comp/suggest.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mingling_core/src/asset/comp/suggest.rs b/mingling_core/src/asset/comp/suggest.rs index 81000d5..62844a7 100644 --- a/mingling_core/src/asset/comp/suggest.rs +++ b/mingling_core/src/asset/comp/suggest.rs @@ -1,5 +1,7 @@ use std::collections::BTreeSet; +use crate::ShellContext; + /// A completion suggestion that tells the shell how to perform completion. /// This can be either a set of specific suggestion items or a request for file completion. #[derive(Debug, Default, Clone, PartialEq, Eq, Hash)] @@ -23,6 +25,11 @@ impl Suggest { pub fn file_comp() -> Self { Self::FileCompletion } + + /// Filters out already typed flag arguments from suggestion results. + pub fn strip_typed_argument(self, ctx: &ShellContext) -> Self { + ctx.strip_typed_argument(self) + } } impl<T> From<T> for Suggest |
