diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-05-04 15:58:37 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-05-04 15:58:37 +0800 |
| commit | 2e9c78ce5997661a5668cc8bc0fd9d922c2320b8 (patch) | |
| tree | fc335e949cd3d0e4de651d3aebf057814f0aeb49 /src/cmds/comp/workspace_sheet.rs | |
| parent | 027987c8bc497f93e7f1e3bc4b880f53b229fd04 (diff) | |
Add `--active` flag to workspace sheet commandmain
Diffstat (limited to 'src/cmds/comp/workspace_sheet.rs')
| -rw-r--r-- | src/cmds/comp/workspace_sheet.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cmds/comp/workspace_sheet.rs b/src/cmds/comp/workspace_sheet.rs index d74f3c8..a0dd260 100644 --- a/src/cmds/comp/workspace_sheet.rs +++ b/src/cmds/comp/workspace_sheet.rs @@ -7,6 +7,8 @@ use crate::systems::comp::{context::CompletionContext, result::CompletionResult} pub fn comp(ctx: CompletionContext) -> CompletionResult { if ctx.current_word.starts_with('-') { return suggest!( + "-a" = t!("workspace_sheet.comp.active").trim(), + "--active" = t!("workspace_sheet.comp.active").trim(), "-A" = t!("workspace_sheet.comp.list_all").trim(), "--list-all" = t!("workspace_sheet.comp.list_all").trim(), "-p" = t!("workspace_sheet.comp.print_path").trim(), @@ -23,7 +25,9 @@ pub fn comp(ctx: CompletionContext) -> CompletionResult { return suggest!().into(); } - if ctx.previous_word == "--list-all" + if ctx.previous_word == "--active" + || ctx.previous_word == "-a" + || ctx.previous_word == "--list-all" || ctx.previous_word == "-A" || ctx.previous_word == "--print-path" || ctx.previous_word == "-p" |
