diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-03-25 21:52:52 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-03-25 21:52:52 +0800 |
| commit | 4cb7c2e91d7dbde32de31e6ab48683d60212ec1d (patch) | |
| tree | 8d70aac6dd33599b278684c05388a319a978b825 /src/systems | |
| parent | fece037f453006c83c45825e3649495180eb30c9 (diff) | |
Add shell flag to completion scripts and rename output files
- Add -F flag to all completion scripts to specify shell type
- Rename completion output files to generic names (comp.sh, comp.zsh,
etc.)
- Add help text for jvn_comp program
- Combine specific and default completion results
- Add completion handlers for sheetdump, sheetedit, and version commands
- Remove word count limits from workspace_alias and workspace_sheet
completions
Diffstat (limited to 'src/systems')
| -rw-r--r-- | src/systems/comp/context.rs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/systems/comp/context.rs b/src/systems/comp/context.rs index 7fb8f43..8d0adc2 100644 --- a/src/systems/comp/context.rs +++ b/src/systems/comp/context.rs @@ -1,4 +1,12 @@ -use clap::Parser; +use clap::{Parser, ValueEnum}; + +#[derive(ValueEnum, Debug, Clone, Copy)] +pub enum ShellFlag { + Zsh, + Bash, + Fish, + Powershell, +} #[derive(Parser, Debug, Clone)] #[command(author, version, about, long_about = None)] @@ -30,4 +38,8 @@ pub struct CompletionContext { /// All words #[arg(short = 'a', long, num_args = 1..)] pub all_words: Vec<String>, + + /// Flag to indicate completion context + #[arg(short = 'F', long, value_enum)] + pub shell_flag: ShellFlag, } |
