diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-03-19 14:22:23 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-03-19 14:22:23 +0800 |
| commit | 66740a1ee38d7eefd302962677a61bb41205bf30 (patch) | |
| tree | cd019e6e69e860db204f9e8fb133b79af4dc2549 /src | |
| parent | e4573f8ab0ea2fe707f4bc1d6383af054ec0d83a (diff) | |
Add sheet subcommand to workspace help documentation
Diffstat (limited to 'src')
| -rw-r--r-- | src/cmds/comp/workspace_sheet.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/cmds/comp/workspace_sheet.rs b/src/cmds/comp/workspace_sheet.rs index 3d7e6d5..3e00e6d 100644 --- a/src/cmds/comp/workspace_sheet.rs +++ b/src/cmds/comp/workspace_sheet.rs @@ -2,6 +2,18 @@ use crate::systems::comp::context::CompletionContext; use just_enough_vcs::system::workspace::workspace::manager::WorkspaceManager; pub fn comp(ctx: CompletionContext) -> Option<Vec<String>> { + if ctx.all_words.len() > 5 { + return None; + } + + if ctx.all_words.contains(&"--list-all".to_string()) + || ctx.all_words.contains(&"-A".to_string()) + { + if ctx.all_words.len() > 4 { + return None; + } + } + if ctx.current_word.starts_with('-') { return Some(vec