Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
feat: Add --config global flag
Maximilian Roosc4d60310cc09
diff --git a/src/cli.rs b/src/cli.rsindex e8cdb678d..411b8d7ab 100644--- a/src/cli.rs+++ b/src/cli.rs@@ -113,13 +113,25 @@ pub enum OutputFormat {#[command(version = version_str())]#[command(disable_help_subcommand = true)]#[command(styles = help_styles())]+#[command(after_long_help = r#"## GLOBAL OPTIONS++**-C <path>**: Run as if started in `<path>` instead of current directory.++**--config <path>**: Override user config file location. Without this flag,+config is loaded from (in order of precedence):+1. `WORKTRUNK_CONFIG_PATH` environment variable+2. `~/.config/worktrunk/config.toml` (Linux/macOS) or `%APPDATA%\worktrunk\config.toml` (Windows)"#)]pub struct Cli {/// Change working directory#[arg(short = 'C', global = true, value_name = "path", display_order = 100)]pub directory: Option<std::path::PathBuf>,+ /// User config file path+ #[arg(long, global = true, value_name = "path", display_order = 101)]+ pub config: Option<std::path::PathBuf>,+/// Show commands and debug info- #[arg(long, short = 'v', global = true, display_order = 101)]+ #[arg(long, short = 'v', global = true, display_order = 102)]pub verbose: bool,/// Use internal mode (outputs directives for shell wrapper)diff --git a/src/config/mod.rs b/src/config/mod.rsindex aa5fd89fb..96a1cb2a1 100644--- a/src/config/mod.rs+++ b/src/config/mod.rs@@ -47,7 +47,9 @@ mod user;pub use commands::{Command, CommandConfig, CommandPhase};pub use expansion::{expand_command_template, expand_template};pub use project::ProjectConfig;-pub use user::{CommitGenerationConfig, UserProjectConfig, WorktrunkConfig, get_config_path};+pub use user::{+ CommitGenerationConfig, UserProjectConfig, WorktrunkConfig, get_config_path, set_config_path,+};#[cfg(test)]mod tests {diff --git a/src/config/user.rs b/src/config/user.rsindex 460b01c72..7a3e50d04 100644--- a/src/config/user.rs+++ b/src/config/user.rs@@ -5,10 +5,19 @@use config::{Config, ConfigError, File};use serde::{Deserialize, Serialize};use std::path::PathBuf;+use std::sync::OnceLock;#[cfg(not(test))]use etcetera::base_strategy::{BaseStrategy, choose_base_strategy};+/// Global override for config path, set via --config CLI flag+static CONFIG_PATH: OnceLock<PathBuf> = OnceLock::new();++/// Set the global config path override (called from CLI --config flag)+pub fn set_config_path(path: PathBuf) {+ CONFIG_PATH.set(path).ok();+}+use super::expansion::expand_template;/// User-level configuration for worktree path formatting and LLM integration.@@ -403,7 +412,12 @@ impl WorktrunkConfig {}pub fn get_config_path() -> Option<PathBuf> {- // Check for test override first (WORKTRUNK_CONFIG_PATH env var)+ // Priority 1: CLI --config flag+ if let Some(path) = CONFIG_PATH.get() {+ return Some(path.clone());+ }++ // Priority 2: Environment variable (also used by tests)if let Ok(path) = std::env::var("WORKTRUNK_CONFIG_PATH") {return Some(PathBuf::from(path));}diff --git a/src/main.rs b/src/main.rsindex ffa3c5c8f..3fa98730a 100644--- a/src/main.rs+++ b/src/main.rs@@ -2,7 +2,7 @@ use anstyle::Style;use anyhow::Context;use clap::FromArgMatches;use std::process;-use worktrunk::config::WorktrunkConfig;+use worktrunk::config::{WorktrunkConfig, set_config_path};use worktrunk::git::{Repository, exit_code, is_command_not_approved, set_base_path};use worktrunk::path::format_path_for_display;use worktrunk::styling::{SUCCESS_EMOJI, println};@@ -104,6 +104,11 @@ fn main() {set_base_path(path);}+ // Initialize config path from --config flag if provided+ if let Some(path) = cli.config {+ set_config_path(path);+ }+// Initialize output context based on --internal flaglet output_mode = if cli.internal {output::OutputMode::Directivediff --git a/tests/snapshots/integration__integration_tests__help__help_beta.snap b/tests/snapshots/integration__integration_tests__help__help_beta.snapindex 491dcb91d..daa88e680 100644--- a/tests/snapshots/integration__integration_tests__help__help_beta.snap+++ b/tests/snapshots/integration__integration_tests__help__help_beta.snap@@ -30,6 +30,9 @@ Options:-C <path>Change working directory+ --config <path>+ User config file path+-v, --verboseShow commands and debug infodiff --git a/tests/snapshots/integration__integration_tests__help__help_config.snap b/tests/snapshots/integration__integration_tests__help__help_config.snapindex 71b69b4a9..fed2e0ce2 100644--- a/tests/snapshots/integration__integration_tests__help__help_config.snap+++ b/tests/snapshots/integration__integration_tests__help__help_config.snap@@ -27,6 +27,9 @@ Options:-C <path>Change working directory+ --config <path>+ User config file path+-v, --verboseShow commands and debug infodiff --git a/tests/snapshots/integration__integration_tests__help__help_config_shell.snap b/tests/snapshots/integration__integration_tests__help__help_config_shell.snapindex 7f77bd3db..1757fca20 100644--- a/tests/snapshots/integration__integration_tests__help__help_config_shell.snap+++ b/tests/snapshots/integration__integration_tests__help__help_config_shell.snap@@ -25,6 +25,9 @@ Options:-C <path>Change working directory+ --config <path>+ User config file path+-v, --verboseShow commands and debug infodiff --git a/tests/snapshots/integration__integration_tests__help__help_list.snap b/tests/snapshots/integration__integration_tests__help__help_list.snapindex db6b5b3c1..76e9047b5 100644--- a/tests/snapshots/integration__integration_tests__help__help_list.snap+++ b/tests/snapshots/integration__integration_tests__help__help_list.snap@@ -37,6 +37,9 @@ Options:-C <path>Change working directory+ --config <path>+ User config file path+-v, --verboseShow commands and debug infodiff --git a/tests/snapshots/integration__integration_tests__help__help_merge.snap b/tests/snapshots/integration__integration_tests__help__help_merge.snapindex 660887ffb..d338485c4 100644--- a/tests/snapshots/integration__integration_tests__help__help_merge.snap+++ b/tests/snapshots/integration__integration_tests__help__help_merge.snap@@ -38,6 +38,9 @@ Options:-C <path>Change working directory+ --config <path>+ User config file path+-v, --verboseShow commands and debug infodiff --git a/tests/snapshots/integration__integration_tests__help__help_remove.snap b/tests/snapshots/integration__integration_tests__help__help_remove.snapindex fba4c1769..70b8bcebd 100644--- a/tests/snapshots/integration__integration_tests__help__help_remove.snap+++ b/tests/snapshots/integration__integration_tests__help__help_remove.snap@@ -29,6 +29,9 @@ Options:-C <path>Change working directory+ --config <path>+ User config file path+-v, --verboseShow commands and debug infodiff --git a/tests/snapshots/integration__integration_tests__help__help_root.snap b/tests/snapshots/integration__integration_tests__help__help_root.snapindex bd2aa8cbc..2909cc5b4 100644--- a/tests/snapshots/integration__integration_tests__help__help_root.snap+++ b/tests/snapshots/integration__integration_tests__help__help_root.snap@@ -26,13 +26,26 @@ Options:-C <path>Change working directory+ --config <path>+ User config file path+-v, --verboseShow commands and debug info-h, --help- Print help+ Print help (see a summary with '-h')-V, --versionPrint version+[38;5;10mGLOBAL OPTIONS[39m++-C <path>: Run as if started in <path> instead of current directory.++--config <path>: Override user config file location. Without this flag,+config is loaded from (in order of precedence):+1. WORKTRUNK_CONFIG_PATH environment variable+2. ~/.config/worktrunk/config.toml (Linux/macOS) or+%APPDATA%\worktrunk\config.toml (Windows)+----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__help__help_switch.snap b/tests/snapshots/integration__integration_tests__help__help_switch.snapindex e3d57b009..3a1308bed 100644--- a/tests/snapshots/integration__integration_tests__help__help_switch.snap+++ b/tests/snapshots/integration__integration_tests__help__help_switch.snap@@ -35,6 +35,9 @@ Options:-C <path>Change working directory+ --config <path>+ User config file path+-v, --verboseShow commands and debug infodiff --git a/tests/snapshots/integration__integration_tests__init__init_bash.snap b/tests/snapshots/integration__integration_tests__init__init_bash.snapindex b321e2fc6..293f82eb1 100644--- a/tests/snapshots/integration__integration_tests__init__init_bash.snap+++ b/tests/snapshots/integration__integration_tests__init__init_bash.snap@@ -21,7 +21,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmptUKRf7/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpcucFH7/test-config.toml---success: trueexit_code: 0@@ -261,7 +261,7 @@ _wt() {case "${cmd}" inwt)- opts="-C -v -h -V --verbose --help --version config beta list switch remove merge"+ opts="-C -v -h -V --config --verbose --help --version config beta list switch remove merge"if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -271,6 +271,10 @@ _wt() {COMPREPLY=($(compgen -f "${cur}"))return 0;;+ --config)+ COMPREPLY=($(compgen -f "${cur}"))+ return 0+ ;;*)COMPREPLY=();;@@ -279,7 +283,7 @@ _wt() {return 0;;wt__beta)- opts="-C -v -h --verbose --help run-hook commit squash push rebase ask-approvals clear-approvals select"+ opts="-C -v -h --config --verbose --help run-hook commit squash push rebase ask-approvals clear-approvals select"if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -289,6 +293,10 @@ _wt() {COMPREPLY=($(compgen -f "${cur}"))return 0;;+ --config)+ COMPREPLY=($(compgen -f "${cur}"))+ return 0+ ;;*)COMPREPLY=();;@@ -297,7 +305,7 @@ _wt() {return 0;;wt__beta__ask__approvals)- opts="-f -C -v -h --force --all --verbose --help"+ opts="-f -C -v -h --force --all --config --verbose --help"if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -307,6 +315,10 @@ _wt() {COMPREPLY=($(compgen -f "${cur}"))return 0;;+ --config)+ COMPREPLY=($(compgen -f "${cur}"))+ return 0+ ;;*)COMPREPLY=();;@@ -315,7 +327,7 @@ _wt() {return 0;;wt__beta__clear__approvals)- opts="-g -C -v -h --global --verbose --help"+ opts="-g -C -v -h --global --config --verbose --help"if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -325,6 +337,10 @@ _wt() {COMPREPLY=($(compgen -f "${cur}"))return 0;;+ --config)+ COMPREPLY=($(compgen -f "${cur}"))+ return 0+ ;;*)COMPREPLY=();;@@ -333,7 +349,7 @@ _wt() {return 0;;wt__beta__commit)- opts="-f -C -v -h --force --no-verify --verbose --help"+ opts="-f -C -v -h --force --no-verify --config --verbose --help"if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -343,6 +359,10 @@ _wt() {COMPREPLY=($(compgen -f "${cur}"))return 0;;+ --config)+ COMPREPLY=($(compgen -f "${cur}"))+ return 0+ ;;*)COMPREPLY=();;@@ -351,7 +371,7 @@ _wt() {return 0;;wt__beta__push)- opts="-C -v -h --allow-merge-commits --verbose --help [TARGET]"+ opts="-C -v -h --allow-merge-commits --config --verbose --help [TARGET]"if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -361,6 +381,10 @@ _wt() {COMPREPLY=($(compgen -f "${cur}"))return 0;;+ --config)+ COMPREPLY=($(compgen -f "${cur}"))+ return 0+ ;;*)COMPREPLY=();;@@ -369,7 +393,7 @@ _wt() {return 0;;wt__beta__rebase)- opts="-C -v -h --verbose --help [TARGET]"+ opts="-C -v -h --config --verbose --help [TARGET]"if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -379,6 +403,10 @@ _wt() {COMPREPLY=($(compgen -f "${cur}"))return 0;;+ --config)+ COMPREPLY=($(compgen -f "${cur}"))+ return 0+ ;;*)COMPREPLY=();;@@ -387,7 +415,7 @@ _wt() {return 0;;wt__beta__run__hook)- opts="-f -C -v -h --force --verbose --help post-create post-start pre-commit pre-merge post-merge"+ opts="-f -C -v -h --force --config --verbose --help post-create post-start pre-commit pre-merge post-merge"if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -397,6 +425,10 @@ _wt() {COMPREPLY=($(compgen -f "${cur}"))return 0;;+ --config)+ COMPREPLY=($(compgen -f "${cur}"))+ return 0+ ;;*)COMPREPLY=();;@@ -405,7 +437,7 @@ _wt() {return 0;;wt__beta__select)- opts="-C -v -h --verbose --help"+ opts="-C -v -h --config --verbose --help"if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -415,6 +447,10 @@ _wt() {COMPREPLY=($(compgen -f "${cur}"))return 0;;+ --config)+ COMPREPLY=($(compgen -f "${cur}"))+ return 0+ ;;*)COMPREPLY=();;@@ -423,7 +459,7 @@ _wt() {return 0;;wt__beta__squash)- opts="-f -C -v -h --force --no-verify --verbose --help [TARGET]"+ opts="-f -C -v -h --force --no-verify --config --verbose --help [TARGET]"if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -433,6 +469,10 @@ _wt() {COMPREPLY=($(compgen -f "${cur}"))return 0;;+ --config)+ COMPREPLY=($(compgen -f "${cur}"))+ return 0+ ;;*)COMPREPLY=();;@@ -441,7 +481,7 @@ _wt() {return 0;;wt__config)- opts="-C -v -h --verbose --help shell create list refresh-cache status"+ opts="-C -v -h --config --verbose --help shell create list refresh-cache status"if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -451,6 +491,10 @@ _wt() {COMPREPLY=($(compgen -f "${cur}"))return 0;;+ --config)+ COMPREPLY=($(compgen -f "${cur}"))+ return 0+ ;;*)COMPREPLY=();;@@ -459,7 +503,7 @@ _wt() {return 0;;wt__config__create)- opts="-C -v -h --verbose --help"+ opts="-C -v -h --config --verbose --help"if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -469,6 +513,10 @@ _wt() {COMPREPLY=($(compgen -f "${cur}"))return 0;;+ --config)+ COMPREPLY=($(compgen -f "${cur}"))+ return 0+ ;;*)COMPREPLY=();;@@ -477,7 +525,7 @@ _wt() {return 0;;wt__config__list)- opts="-C -v -h --verbose --help"+ opts="-C -v -h --config --verbose --help"if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -487,6 +535,10 @@ _wt() {COMPREPLY=($(compgen -f "${cur}"))return 0;;+ --config)+ COMPREPLY=($(compgen -f "${cur}"))+ return 0+ ;;*)COMPREPLY=();;@@ -495,7 +547,7 @@ _wt() {return 0;;wt__config__refresh__cache)- opts="-C -v -h --verbose --help"+ opts="-C -v -h --config --verbose --help"if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -505,6 +557,10 @@ _wt() {COMPREPLY=($(compgen -f "${cur}"))return 0;;+ --config)+ COMPREPLY=($(compgen -f "${cur}"))+ return 0+ ;;*)COMPREPLY=();;@@ -513,7 +569,7 @@ _wt() {return 0;;wt__config__shell)- opts="-C -v -h --verbose --help init install"+ opts="-C -v -h --config --verbose --help init install"if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -523,6 +579,10 @@ _wt() {COMPREPLY=($(compgen -f "${cur}"))return 0;;+ --config)+ COMPREPLY=($(compgen -f "${cur}"))+ return 0+ ;;*)COMPREPLY=();;@@ -531,7 +591,7 @@ _wt() {return 0;;wt__config__shell__init)- opts="-C -v -h --command-name --verbose --help bash fish zsh"+ opts="-C -v -h --command-name --config --verbose --help bash fish zsh"if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -545,6 +605,10 @@ _wt() {COMPREPLY=($(compgen -f "${cur}"))return 0;;+ --config)+ COMPREPLY=($(compgen -f "${cur}"))+ return 0+ ;;*)COMPREPLY=();;@@ -553,7 +617,7 @@ _wt() {return 0;;wt__config__shell__install)- opts="-f -C -v -h --force --command-name --verbose --help bash fish zsh"+ opts="-f -C -v -h --force --command-name --config --verbose --help bash fish zsh"if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -567,6 +631,10 @@ _wt() {COMPREPLY=($(compgen -f "${cur}"))return 0;;+ --config)+ COMPREPLY=($(compgen -f "${cur}"))+ return 0+ ;;*)COMPREPLY=();;@@ -575,7 +643,7 @@ _wt() {return 0;;wt__config__status)- opts="-C -v -h --verbose --help set unset"+ opts="-C -v -h --config --verbose --help set unset"if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -585,6 +653,10 @@ _wt() {COMPREPLY=($(compgen -f "${cur}"))return 0;;+ --config)+ COMPREPLY=($(compgen -f "${cur}"))+ return 0+ ;;*)COMPREPLY=();;@@ -593,7 +665,7 @@ _wt() {return 0;;wt__config__status__set)- opts="-C -v -h --branch --verbose --help <VALUE>"+ opts="-C -v -h --branch --config --verbose --help <VALUE>"if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -607,6 +679,10 @@ _wt() {COMPREPLY=($(compgen -f "${cur}"))return 0;;+ --config)+ COMPREPLY=($(compgen -f "${cur}"))+ return 0+ ;;*)COMPREPLY=();;@@ -615,7 +691,7 @@ _wt() {return 0;;wt__config__status__unset)- opts="-C -v -h --verbose --help [TARGET]"+ opts="-C -v -h --config --verbose --help [TARGET]"if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -625,6 +701,10 @@ _wt() {COMPREPLY=($(compgen -f "${cur}"))return 0;;+ --config)+ COMPREPLY=($(compgen -f "${cur}"))+ return 0+ ;;*)COMPREPLY=();;@@ -633,7 +713,7 @@ _wt() {return 0;;wt__list)- opts="-C -v -h --format --branches --remotes --full --progressive --no-progressive --verbose --help"+ opts="-C -v -h --format --branches --remotes --full --progressive --no-progressive --config --verbose --help"if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -647,6 +727,10 @@ _wt() {COMPREPLY=($(compgen -f "${cur}"))return 0;;+ --config)+ COMPREPLY=($(compgen -f "${cur}"))+ return 0+ ;;*)COMPREPLY=();;@@ -655,7 +739,7 @@ _wt() {return 0;;wt__merge)- opts="-f -C -v -h --no-squash --no-commit --no-remove --no-verify --force --tracked-only --verbose --help [TARGET]"+ opts="-f -C -v -h --no-squash --no-commit --no-remove --no-verify --force --tracked-only --config --verbose --help [TARGET]"if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -665,6 +749,10 @@ _wt() {COMPREPLY=($(compgen -f "${cur}"))return 0;;+ --config)+ COMPREPLY=($(compgen -f "${cur}"))+ return 0+ ;;*)COMPREPLY=();;@@ -673,7 +761,7 @@ _wt() {return 0;;wt__remove)- opts="-D -C -v -h --no-delete-branch --force-delete --no-background --verbose --help [WORKTREES]..."+ opts="-D -C -v -h --no-delete-branch --force-delete --no-background --config --verbose --help [WORKTREES]..."if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -683,6 +771,10 @@ _wt() {COMPREPLY=($(compgen -f "${cur}"))return 0;;+ --config)+ COMPREPLY=($(compgen -f "${cur}"))+ return 0+ ;;*)COMPREPLY=();;@@ -691,7 +783,7 @@ _wt() {return 0;;wt__switch)- opts="-c -b -x -f -C -v -h --create --base --execute --force --no-verify --verbose --help <BRANCH>"+ opts="-c -b -x -f -C -v -h --create --base --execute --force --no-verify --config --verbose --help <BRANCH>"if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -717,6 +809,10 @@ _wt() {COMPREPLY=($(compgen -f "${cur}"))return 0;;+ --config)+ COMPREPLY=($(compgen -f "${cur}"))+ return 0+ ;;*)COMPREPLY=();;diff --git a/tests/snapshots/integration__integration_tests__init__init_fish.snap b/tests/snapshots/integration__integration_tests__init__init_fish.snapindex f06160897..49600c3ed 100644--- a/tests/snapshots/integration__integration_tests__init__init_fish.snap+++ b/tests/snapshots/integration__integration_tests__init__init_fish.snap@@ -21,7 +21,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpAjef2E/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpmHNUsf/test-config.toml---success: trueexit_code: 0@@ -165,7 +165,7 @@ end# Static completions (commands and flags)# Print an optspec for argparse to handle cmd's options that are independent of any subcommand.function __fish_wt_global_optspecs- string join \n C= v/verbose internal h/help V/version+ string join \n C= config= v/verbose internal h/help V/versionendfunction __fish_wt_needs_command@@ -190,8 +190,9 @@ function __fish_wt_using_subcommandendcomplete -c wt -n "__fish_wt_needs_command" -s C -d 'Change working directory' -r -F+complete -c wt -n "__fish_wt_needs_command" -l config -d 'User config file path' -r -Fcomplete -c wt -n "__fish_wt_needs_command" -s v -l verbose -d 'Show commands and debug info'-complete -c wt -n "__fish_wt_needs_command" -s h -l help -d 'Print help'+complete -c wt -n "__fish_wt_needs_command" -s h -l help -d 'Print help (see more with \'--help\')'complete -c wt -n "__fish_wt_needs_command" -s V -l version -d 'Print version'complete -c wt -n "__fish_wt_needs_command" -f -a "config" -d 'Manage configuration and shell integration'complete -c wt -n "__fish_wt_needs_command" -f -a "beta" -d 'Development and testing utilities'@@ -200,6 +201,7 @@ complete -c wt -n "__fish_wt_needs_command" -f -a "switch" -d 'Switch to a worktcomplete -c wt -n "__fish_wt_needs_command" -f -a "remove" -d 'Remove worktree and branch'complete -c wt -n "__fish_wt_needs_command" -f -a "merge" -d 'Merge worktree into target branch'complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from shell create list refresh-cache status" -s C -d 'Change working directory' -r -F+complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from shell create list refresh-cache status" -l config -d 'User config file path' -r -Fcomplete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from shell create list refresh-cache status" -s v -l verbose -d 'Show commands and debug info'complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from shell create list refresh-cache status" -s h -l help -d 'Print help (see more with \'--help\')'complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from shell create list refresh-cache status" -f -a "shell" -d 'Shell integration setup'@@ -208,25 +210,31 @@ complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcomcomplete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from shell create list refresh-cache status" -f -a "refresh-cache" -d 'Refresh default branch from remote'complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from shell create list refresh-cache status" -f -a "status" -d 'Manage branch status markers'complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from shell" -s C -d 'Change working directory' -r -F+complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from shell" -l config -d 'User config file path' -r -Fcomplete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from shell" -s v -l verbose -d 'Show commands and debug info'complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from shell" -s h -l help -d 'Print help'complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from shell" -f -a "init" -d 'Generate shell integration code'complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from shell" -f -a "install" -d 'Write shell integration to config files'complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from create" -s C -d 'Change working directory' -r -F+complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from create" -l config -d 'User config file path' -r -Fcomplete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from create" -s v -l verbose -d 'Show commands and debug info'complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from create" -s h -l help -d 'Print help'complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from list" -s C -d 'Change working directory' -r -F+complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from list" -l config -d 'User config file path' -r -Fcomplete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from list" -s v -l verbose -d 'Show commands and debug info'complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from list" -s h -l help -d 'Print help'complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from refresh-cache" -s C -d 'Change working directory' -r -F+complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from refresh-cache" -l config -d 'User config file path' -r -Fcomplete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from refresh-cache" -s v -l verbose -d 'Show commands and debug info'complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from refresh-cache" -s h -l help -d 'Print help'complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from status" -s C -d 'Change working directory' -r -F+complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from status" -l config -d 'User config file path' -r -Fcomplete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from status" -s v -l verbose -d 'Show commands and debug info'complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from status" -s h -l help -d 'Print help'complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from status" -f -a "set" -d 'Set status emoji for branch'complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from status" -f -a "unset" -d 'Clear status emoji'complete -c wt -n "__fish_wt_using_subcommand beta; and not __fish_seen_subcommand_from run-hook commit squash push rebase ask-approvals clear-approvals select" -s C -d 'Change working directory' -r -F+complete -c wt -n "__fish_wt_using_subcommand beta; and not __fish_seen_subcommand_from run-hook commit squash push rebase ask-approvals clear-approvals select" -l config -d 'User config file path' -r -Fcomplete -c wt -n "__fish_wt_using_subcommand beta; and not __fish_seen_subcommand_from run-hook commit squash push rebase ask-approvals clear-approvals select" -s v -l verbose -d 'Show commands and debug info'complete -c wt -n "__fish_wt_using_subcommand beta; and not __fish_seen_subcommand_from run-hook commit squash push rebase ask-approvals clear-approvals select" -s h -l help -d 'Print help'complete -c wt -n "__fish_wt_using_subcommand beta; and not __fish_seen_subcommand_from run-hook commit squash push rebase ask-approvals clear-approvals select" -f -a "run-hook" -d 'Run project hook'@@ -238,41 +246,50 @@ complete -c wt -n "__fish_wt_using_subcommand beta; and not __fish_seen_subcommacomplete -c wt -n "__fish_wt_using_subcommand beta; and not __fish_seen_subcommand_from run-hook commit squash push rebase ask-approvals clear-approvals select" -f -a "clear-approvals" -d 'Clear approved commands from config'complete -c wt -n "__fish_wt_using_subcommand beta; and not __fish_seen_subcommand_from run-hook commit squash push rebase ask-approvals clear-approvals select" -f -a "select" -d 'Interactive worktree selector'complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from run-hook" -s C -d 'Change working directory' -r -F+complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from run-hook" -l config -d 'User config file path' -r -Fcomplete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from run-hook" -s f -l force -d 'Skip approval prompts'complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from run-hook" -s v -l verbose -d 'Show commands and debug info'complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from run-hook" -s h -l help -d 'Print help'complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from commit" -s C -d 'Change working directory' -r -F+complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from commit" -l config -d 'User config file path' -r -Fcomplete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from commit" -s f -l force -d 'Skip approval prompts'complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from commit" -l no-verify -d 'Skip pre-commit hooks'complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from commit" -s v -l verbose -d 'Show commands and debug info'complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from commit" -s h -l help -d 'Print help'complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from squash" -s C -d 'Change working directory' -r -F+complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from squash" -l config -d 'User config file path' -r -Fcomplete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from squash" -s f -l force -d 'Skip approval prompts'complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from squash" -l no-verify -d 'Skip pre-commit hooks'complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from squash" -s v -l verbose -d 'Show commands and debug info'complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from squash" -s h -l help -d 'Print help'complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from push" -s C -d 'Change working directory' -r -F+complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from push" -l config -d 'User config file path' -r -Fcomplete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from push" -l allow-merge-commits -d 'Allow merge commits'complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from push" -s v -l verbose -d 'Show commands and debug info'complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from push" -s h -l help -d 'Print help (see more with \'--help\')'complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from rebase" -s C -d 'Change working directory' -r -F+complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from rebase" -l config -d 'User config file path' -r -Fcomplete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from rebase" -s v -l verbose -d 'Show commands and debug info'complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from rebase" -s h -l help -d 'Print help'complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from ask-approvals" -s C -d 'Change working directory' -r -F+complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from ask-approvals" -l config -d 'User config file path' -r -Fcomplete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from ask-approvals" -s f -l force -d 'Skip approval prompts'complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from ask-approvals" -l all -d 'Show all commands'complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from ask-approvals" -s v -l verbose -d 'Show commands and debug info'complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from ask-approvals" -s h -l help -d 'Print help'complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from clear-approvals" -s C -d 'Change working directory' -r -F+complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from clear-approvals" -l config -d 'User config file path' -r -Fcomplete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from clear-approvals" -s g -l global -d 'Clear global approvals'complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from clear-approvals" -s v -l verbose -d 'Show commands and debug info'complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from clear-approvals" -s h -l help -d 'Print help'complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from select" -s C -d 'Change working directory' -r -F+complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from select" -l config -d 'User config file path' -r -Fcomplete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from select" -s v -l verbose -d 'Show commands and debug info'complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from select" -s h -l help -d 'Print help (see more with \'--help\')'complete -c wt -n "__fish_wt_using_subcommand list" -l format -d 'Output format (table, json)' -r -f -a "table\t'Human-readable table format'json\t'JSON output'"complete -c wt -n "__fish_wt_using_subcommand list" -s C -d 'Change working directory' -r -F+complete -c wt -n "__fish_wt_using_subcommand list" -l config -d 'User config file path' -r -Fcomplete -c wt -n "__fish_wt_using_subcommand list" -l branches -d 'Include branches without worktrees'complete -c wt -n "__fish_wt_using_subcommand list" -l remotes -d 'Include remote branches from primary remote'complete -c wt -n "__fish_wt_using_subcommand list" -l full -d 'Show CI, conflicts, diffs'@@ -283,18 +300,21 @@ complete -c wt -n "__fish_wt_using_subcommand list" -s h -l help -d 'Print helpcomplete -c wt -n "__fish_wt_using_subcommand switch" -s b -l base -f -d 'Base branch (defaults to default branch)' -rcomplete -c wt -n "__fish_wt_using_subcommand switch" -s x -l execute -d 'Execute command after switching' -rcomplete -c wt -n "__fish_wt_using_subcommand switch" -s C -d 'Change working directory' -r -F+complete -c wt -n "__fish_wt_using_subcommand switch" -l config -d 'User config file path' -r -Fcomplete -c wt -n "__fish_wt_using_subcommand switch" -s c -l create -d 'Create a new branch'complete -c wt -n "__fish_wt_using_subcommand switch" -s f -l force -d 'Skip approval prompts'complete -c wt -n "__fish_wt_using_subcommand switch" -l no-verify -d 'Skip all project hooks'complete -c wt -n "__fish_wt_using_subcommand switch" -s v -l verbose -d 'Show commands and debug info'complete -c wt -n "__fish_wt_using_subcommand switch" -s h -l help -d 'Print help (see more with \'--help\')'complete -c wt -n "__fish_wt_using_subcommand remove" -s C -d 'Change working directory' -r -F+complete -c wt -n "__fish_wt_using_subcommand remove" -l config -d 'User config file path' -r -Fcomplete -c wt -n "__fish_wt_using_subcommand remove" -l no-delete-branch -d 'Keep branch after removal'complete -c wt -n "__fish_wt_using_subcommand remove" -s D -l force-delete -d 'Delete unmerged branches'complete -c wt -n "__fish_wt_using_subcommand remove" -l no-background -d 'Run removal in foreground'complete -c wt -n "__fish_wt_using_subcommand remove" -s v -l verbose -d 'Show commands and debug info'complete -c wt -n "__fish_wt_using_subcommand remove" -s h -l help -d 'Print help (see more with \'--help\')'complete -c wt -n "__fish_wt_using_subcommand merge" -s C -d 'Change working directory' -r -F+complete -c wt -n "__fish_wt_using_subcommand merge" -l config -d 'User config file path' -r -Fcomplete -c wt -n "__fish_wt_using_subcommand merge" -l no-squash -d 'Skip commit squashing'complete -c wt -n "__fish_wt_using_subcommand merge" -l no-commit -d 'Skip commit, squash, and rebase'complete -c wt -n "__fish_wt_using_subcommand merge" -l no-remove -d 'Keep worktree after merge'diff --git a/tests/snapshots/integration__integration_tests__init__init_zsh.snap b/tests/snapshots/integration__integration_tests__init__init_zsh.snapindex 63f5600d1..96cacc0f1 100644--- a/tests/snapshots/integration__integration_tests__init__init_zsh.snap+++ b/tests/snapshots/integration__integration_tests__init__init_zsh.snap@@ -21,7 +21,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpKR9Xgz/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpOTBJGU/test-config.toml---success: trueexit_code: 0@@ -187,10 +187,11 @@ _wt() {local context curcontext="$curcontext" state line_arguments "${_arguments_options[@]}" : \'-C+[Change working directory]:path:_files' \+'--config=[User config file path]:path:_files' \'-v[Show commands and debug info]' \'--verbose[Show commands and debug info]' \-'-h[Print help]' \-'--help[Print help]' \+'-h[Print help (see more with '\''--help'\'')]' \+'--help[Print help (see more with '\''--help'\'')]' \'-V[Print version]' \'--version[Print version]' \":: :_wt_commands" \@@ -205,6 +206,7 @@ _wt() {(config)_arguments "${_arguments_options[@]}" : \'-C+[Change working directory]:path:_files' \+'--config=[User config file path]:path:_files' \'-v[Show commands and debug info]' \'--verbose[Show commands and debug info]' \'-h[Print help (see more with '\''--help'\'')]' \@@ -222,6 +224,7 @@ _arguments "${_arguments_options[@]}" : \(shell)_arguments "${_arguments_options[@]}" : \'-C+[Change working directory]:path:_files' \+'--config=[User config file path]:path:_files' \'-v[Show commands and debug info]' \'--verbose[Show commands and debug info]' \'-h[Print help]' \@@ -240,6 +243,7 @@ _arguments "${_arguments_options[@]}" : \_arguments "${_arguments_options[@]}" : \'--command-name=[Command name]:COMMAND_NAME:_default' \'-C+[Change working directory]:path:_files' \+'--config=[User config file path]:path:_files' \'-v[Show commands and debug info]' \'--verbose[Show commands and debug info]' \'-h[Print help (see more with '\''--help'\'')]' \@@ -251,6 +255,7 @@ _arguments "${_arguments_options[@]}" : \_arguments "${_arguments_options[@]}" : \'--command-name=[Command name]:COMMAND_NAME:_default' \'-C+[Change working directory]:path:_files' \+'--config=[User config file path]:path:_files' \'-f[Skip confirmation prompt]' \'--force[Skip confirmation prompt]' \'-v[Show commands and debug info]' \@@ -267,6 +272,7 @@ esac(create)_arguments "${_arguments_options[@]}" : \'-C+[Change working directory]:path:_files' \+'--config=[User config file path]:path:_files' \'-v[Show commands and debug info]' \'--verbose[Show commands and debug info]' \'-h[Print help]' \@@ -276,6 +282,7 @@ _arguments "${_arguments_options[@]}" : \(list)_arguments "${_arguments_options[@]}" : \'-C+[Change working directory]:path:_files' \+'--config=[User config file path]:path:_files' \'-v[Show commands and debug info]' \'--verbose[Show commands and debug info]' \'-h[Print help]' \@@ -285,6 +292,7 @@ _arguments "${_arguments_options[@]}" : \(refresh-cache)_arguments "${_arguments_options[@]}" : \'-C+[Change working directory]:path:_files' \+'--config=[User config file path]:path:_files' \'-v[Show commands and debug info]' \'--verbose[Show commands and debug info]' \'-h[Print help]' \@@ -294,6 +302,7 @@ _arguments "${_arguments_options[@]}" : \(status)_arguments "${_arguments_options[@]}" : \'-C+[Change working directory]:path:_files' \+'--config=[User config file path]:path:_files' \'-v[Show commands and debug info]' \'--verbose[Show commands and debug info]' \'-h[Print help]' \@@ -312,6 +321,7 @@ _arguments "${_arguments_options[@]}" : \_arguments "${_arguments_options[@]}" : \'--branch=[Target branch (defaults to current)]:BRANCH:_default' \'-C+[Change working directory]:path:_files' \+'--config=[User config file path]:path:_files' \'-v[Show commands and debug info]' \'--verbose[Show commands and debug info]' \'-h[Print help]' \@@ -322,6 +332,7 @@ _arguments "${_arguments_options[@]}" : \(unset)_arguments "${_arguments_options[@]}" : \'-C+[Change working directory]:path:_files' \+'--config=[User config file path]:path:_files' \'-v[Show commands and debug info]' \'--verbose[Show commands and debug info]' \'-h[Print help]' \@@ -340,6 +351,7 @@ esac(beta)_arguments "${_arguments_options[@]}" : \'-C+[Change working directory]:path:_files' \+'--config=[User config file path]:path:_files' \'-v[Show commands and debug info]' \'--verbose[Show commands and debug info]' \'-h[Print help]' \@@ -357,6 +369,7 @@ _arguments "${_arguments_options[@]}" : \(run-hook)_arguments "${_arguments_options[@]}" : \'-C+[Change working directory]:path:_files' \+'--config=[User config file path]:path:_files' \'-f[Skip approval prompts]' \'--force[Skip approval prompts]' \'-v[Show commands and debug info]' \@@ -369,6 +382,7 @@ _arguments "${_arguments_options[@]}" : \(commit)_arguments "${_arguments_options[@]}" : \'-C+[Change working directory]:path:_files' \+'--config=[User config file path]:path:_files' \'-f[Skip approval prompts]' \'--force[Skip approval prompts]' \'--no-verify[Skip pre-commit hooks]' \@@ -381,6 +395,7 @@ _arguments "${_arguments_options[@]}" : \(squash)_arguments "${_arguments_options[@]}" : \'-C+[Change working directory]:path:_files' \+'--config=[User config file path]:path:_files' \'-f[Skip approval prompts]' \'--force[Skip approval prompts]' \'--no-verify[Skip pre-commit hooks]' \@@ -394,6 +409,7 @@ _arguments "${_arguments_options[@]}" : \(push)_arguments "${_arguments_options[@]}" : \'-C+[Change working directory]:path:_files' \+'--config=[User config file path]:path:_files' \'--allow-merge-commits[Allow merge commits]' \'-v[Show commands and debug info]' \'--verbose[Show commands and debug info]' \@@ -405,6 +421,7 @@ _arguments "${_arguments_options[@]}" : \(rebase)_arguments "${_arguments_options[@]}" : \'-C+[Change working directory]:path:_files' \+'--config=[User config file path]:path:_files' \'-v[Show commands and debug info]' \'--verbose[Show commands and debug info]' \'-h[Print help]' \@@ -415,6 +432,7 @@ _arguments "${_arguments_options[@]}" : \(ask-approvals)_arguments "${_arguments_options[@]}" : \'-C+[Change working directory]:path:_files' \+'--config=[User config file path]:path:_files' \'-f[Skip approval prompts]' \'--force[Skip approval prompts]' \'--all[Show all commands]' \@@ -427,6 +445,7 @@ _arguments "${_arguments_options[@]}" : \(clear-approvals)_arguments "${_arguments_options[@]}" : \'-C+[Change working directory]:path:_files' \+'--config=[User config file path]:path:_files' \'-g[Clear global approvals]' \'--global[Clear global approvals]' \'-v[Show commands and debug info]' \@@ -438,6 +457,7 @@ _arguments "${_arguments_options[@]}" : \(select)_arguments "${_arguments_options[@]}" : \'-C+[Change working directory]:path:_files' \+'--config=[User config file path]:path:_files' \'-v[Show commands and debug info]' \'--verbose[Show commands and debug info]' \'-h[Print help (see more with '\''--help'\'')]' \@@ -453,6 +473,7 @@ _arguments "${_arguments_options[@]}" : \'--format=[Output format (table, json)]:FORMAT:((table\:"Human-readable table format"json\:"JSON output"))' \'-C+[Change working directory]:path:_files' \+'--config=[User config file path]:path:_files' \'--branches[Include branches without worktrees]' \'--remotes[Include remote branches from primary remote]' \'--full[Show CI, conflicts, diffs]' \@@ -471,6 +492,7 @@ _arguments "${_arguments_options[@]}" : \'-x+[Execute command after switching]:EXECUTE:_default' \'--execute=[Execute command after switching]:EXECUTE:_default' \'-C+[Change working directory]:path:_files' \+'--config=[User config file path]:path:_files' \'-c[Create a new branch]' \'--create[Create a new branch]' \'-f[Skip approval prompts]' \@@ -486,6 +508,7 @@ _arguments "${_arguments_options[@]}" : \(remove)_arguments "${_arguments_options[@]}" : \'-C+[Change working directory]:path:_files' \+'--config=[User config file path]:path:_files' \'--no-delete-branch[Keep branch after removal]' \'-D[Delete unmerged branches]' \'--force-delete[Delete unmerged branches]' \@@ -500,6 +523,7 @@ _arguments "${_arguments_options[@]}" : \(merge)_arguments "${_arguments_options[@]}" : \'-C+[Change working directory]:path:_files' \+'--config=[User config file path]:path:_files' \'--no-squash[Skip commit squashing]' \'--no-commit[Skip commit, squash, and rebase]' \'--no-remove[Keep worktree after merge]' \