Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

feat: Deprecate `completion` command and remove `no_verify` from merge

Maximilian Rooseabce72a33cf
diff --git a/src/cli.rs b/src/cli.rs
index 7d0e532dd..60d18ed9f 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -73,18 +73,18 @@ pub enum StandaloneCommand {
/// Hook type to run
hook_type: HookType,
- /// Skip command approval prompts
+ /// Auto-approve project commands without saving approvals.
#[arg(short, long)]
force: bool,
},
/// Commit changes with LLM-generated message
Commit {
- /// Skip command approval prompts
+ /// Auto-approve project commands without saving approvals.
#[arg(short, long)]
force: bool,
- /// Skip all project hooks (pre-commit-command)
+ /// Skip pre-commit project hooks.
#[arg(long)]
no_verify: bool,
},
@@ -94,11 +94,11 @@ pub enum StandaloneCommand {
/// Target branch to squash against (defaults to default branch)
target: Option<String>,
- /// Skip command approval prompts
+ /// Auto-approve project commands without saving approvals.
#[arg(short, long)]
force: bool,
- /// Skip all project hooks (pre-commit-command, pre-merge-command)
+ /// Skip pre-commit project hooks
#[arg(long)]
no_verify: bool,
},
@@ -124,7 +124,7 @@ pub enum StandaloneCommand {
/// Approve commands in the project config (shows unapproved by default)
AskApprovals {
- /// Skip command approval prompts
+ /// Auto-approve project commands without saving approvals.
#[arg(short, long)]
force: bool,
@@ -230,17 +230,17 @@ Rows are dimmed when no unique work (≡ matches main OR ∅ no commits)."#)]
#[command(after_help = r#"BEHAVIOR:
Switching to Existing Worktree:
- - If worktree exists for branch, changes directory to it
+ - If worktree exists for branch, changes directory via shell integration
- No hooks run
- No branch creation
Creating New Worktree (--create):
1. Creates new branch (defaults to current default branch as base)
- 2. Creates worktree in parallel directory (../<branch>)
+ 2. Creates worktree in configured location (default: ../{main-worktree}.{branch})
3. Runs post-create hooks sequentially (blocking)
4. Shows success message
5. Spawns post-start hooks in background (non-blocking)
- 6. Changes directory to new worktree
+ 6. Changes directory to new worktree via shell integration
HOOKS:
@@ -291,11 +291,11 @@ Skip hooks during creation:
#[arg(short = 'x', long)]
execute: Option<String>,
- /// Skip confirmation prompt
+ /// Auto-approve project commands without saving approvals.
#[arg(short = 'f', long)]
force: bool,
- /// Skip all project hooks (post-create, post-start)
+ /// Skip all project hooks: post-create and post-start.
#[arg(long)]
no_verify: bool,
},
@@ -419,15 +419,15 @@ Skip pre-merge commands:
#[arg(long)]
no_commit: bool,
- /// Keep worktree after merging (don't remove)
+ /// Keep the worktree after merging.
#[arg(long = "no-remove")]
no_remove: bool,
- /// Skip all project hooks (pre-merge-command)
+ /// Skip pre-merge project hooks.
#[arg(long)]
no_verify: bool,
- /// Skip approval prompts for commands
+ /// Auto-approve project commands without saving approvals.
#[arg(short, long)]
force: bool,
@@ -436,14 +436,6 @@ Skip pre-merge commands:
tracked_only: bool,
},
- /// Generate shell completion script (deprecated - use init instead)
- #[command(hide = true)]
- Completion {
- /// Shell to generate completions for
- #[arg(value_enum)]
- shell: Shell,
- },
-
/// Internal completion helper (hidden)
#[command(hide = true)]
Complete {
diff --git a/src/commands/completion.rs b/src/commands/completion.rs
index 05fe86629..986723471 100644
--- a/src/commands/completion.rs
+++ b/src/commands/completion.rs
@@ -10,25 +10,9 @@
// This approach uses stable APIs and handles edge cases that clap's completion system
// isn't designed for. See the extensive test suite in tests/integration_tests/completion.rs
-use clap::Command;
-use clap_complete::{Shell as CompletionShell, generate};
-use std::io;
use worktrunk::git::{GitError, Repository};
-use worktrunk::shell::Shell;
use worktrunk::styling::{ERROR, ERROR_EMOJI, println};
-pub fn handle_completion(shell: Shell, cli_cmd: &mut Command) {
- let completion_shell = match shell {
- Shell::Bash | Shell::Oil => CompletionShell::Bash,
- Shell::Fish => CompletionShell::Fish,
- Shell::Zsh => CompletionShell::Zsh,
- _ => unreachable!(
- "CLI parsing ensures only shells that support completion can be passed here"
- ),
- };
- generate(completion_shell, cli_cmd, "wt", &mut io::stdout());
-}
-
#[derive(Debug, PartialEq)]
enum CompletionContext {
SwitchBranch,
diff --git a/src/commands/merge.rs b/src/commands/merge.rs
index dbadde1cf..f0fe3f1fb 100644
--- a/src/commands/merge.rs
+++ b/src/commands/merge.rs
@@ -36,11 +36,10 @@ impl<'a> MergeCommandCollector<'a> {
// Collect original commands (not expanded) for approval
// Expansion happens later in prepare_project_commands during execution
- // Collect pre-commit commands if we'll commit (direct or via squash) and not skipping verification
+ // Collect pre-commit commands if we'll commit (direct or via squash)
// These run before: (1) direct commit (line 179), or (2) squash commit (line 194 → handle_dev_squash)
if !self.no_commit
&& self.repo.is_dirty()?
- && !self.no_verify
&& let Some(pre_commit_config) = &project_config.pre_commit_command
{
all_commands.extend(pre_commit_config.commands_with_phase(CommandPhase::PreCommit));
@@ -132,7 +131,6 @@ pub fn handle_merge(
// Commit immediately when not squashing
let mut options = CommitOptions::new(&repo, &config, &worktree_path, &current_branch);
options.target_branch = Some(&target_branch);
- options.no_verify = no_verify;
options.force = force;
options.tracked_only = tracked_only;
options.auto_trust = true; // commands already approved in merge batch
@@ -148,7 +146,7 @@ pub fn handle_merge(
// Squash commits if enabled - track whether squashing occurred
let squashed = if squash_enabled {
- handle_squash(&target_branch, no_verify, force)?
+ handle_squash(&target_branch, force)?
} else {
false
};
@@ -278,9 +276,9 @@ fn handle_merge_summary_output(primary_path: Option<&std::path::Path>) -> Result
Ok(())
}
-fn handle_squash(target_branch: &str, no_verify: bool, force: bool) -> Result<bool, GitError> {
+fn handle_squash(target_branch: &str, force: bool) -> Result<bool, GitError> {
// Delegate to the shared standalone implementation (auto_trust=true: commands approved in batch)
- super::standalone::handle_standalone_squash(Some(target_branch), force, no_verify, true)
+ super::standalone::handle_standalone_squash(Some(target_branch), force, false, true)
}
/// Run pre-merge commands sequentially (blocking, fail-fast)
diff --git a/src/commands/mod.rs b/src/commands/mod.rs
index dca4a5d7d..fb6f8760a 100644
--- a/src/commands/mod.rs
+++ b/src/commands/mod.rs
@@ -16,7 +16,7 @@ pub mod select;
pub mod standalone;
pub mod worktree;
-pub use completion::{handle_complete, handle_completion};
+pub use completion::handle_complete;
pub use config::{
handle_config_help, handle_config_init, handle_config_list, handle_config_refresh_cache,
};
diff --git a/src/commands/standalone.rs b/src/commands/standalone.rs
index 3319b5a45..c574b60d3 100644
--- a/src/commands/standalone.rs
+++ b/src/commands/standalone.rs
@@ -121,7 +121,7 @@ pub fn handle_standalone_commit(force: bool, no_verify: bool) -> Result<(), GitE
pub fn handle_standalone_squash(
target: Option<&str>,
force: bool,
- no_verify: bool,
+ skip_pre_commit: bool,
auto_trust: bool,
) -> Result<bool, GitError> {
let CommandEnv {
@@ -134,8 +134,8 @@ pub fn handle_standalone_squash(
// Get target branch (default to default branch if not provided)
let target_branch = repo.resolve_target_branch(target)?;
- // Run pre-commit hook unless --no-verify was specified
- if !no_verify && let Some(project_config) = load_project_config(&repo)? {
+ // Run pre-commit hook unless explicitly skipped
+ if !skip_pre_commit && let Some(project_config) = load_project_config(&repo)? {
run_pre_commit_commands(
&project_config,
&current_branch,
diff --git a/src/main.rs b/src/main.rs
index 900ca98b4..1e6eee775 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -17,11 +17,11 @@ pub use crate::cli::OutputFormat;
use commands::handle_select;
use commands::worktree::SwitchResult;
use commands::{
- ConfigAction, handle_complete, handle_completion, handle_config_help, handle_config_init,
- handle_config_list, handle_config_refresh_cache, handle_configure_shell, handle_init,
- handle_list, handle_merge, handle_remove, handle_standalone_ask_approvals,
- handle_standalone_commit, handle_standalone_push, handle_standalone_rebase,
- handle_standalone_run_hook, handle_standalone_squash, handle_switch,
+ ConfigAction, handle_complete, handle_config_help, handle_config_init, handle_config_list,
+ handle_config_refresh_cache, handle_configure_shell, handle_init, handle_list, handle_merge,
+ handle_remove, handle_standalone_ask_approvals, handle_standalone_commit,
+ handle_standalone_push, handle_standalone_rebase, handle_standalone_run_hook,
+ handle_standalone_squash, handle_switch,
};
use output::{execute_user_command, handle_remove_output, handle_switch_output};
@@ -300,11 +300,6 @@ fn main() {
force,
tracked_only,
),
- Commands::Completion { shell } => {
- let mut cli_cmd = Cli::command();
- handle_completion(shell, &mut cli_cmd);
- Ok(())
- }
Commands::Complete { args } => handle_complete(args),
};
diff --git a/tests/integration_tests/config_list.rs b/tests/integration_tests/config_list.rs
index 6deaa7a09..71deaafa4 100644
--- a/tests/integration_tests/config_list.rs
+++ b/tests/integration_tests/config_list.rs
@@ -161,10 +161,10 @@ fn test_config_list_outside_git_repo() {
success: true
exit_code: 0
----- stdout -----
- ⚪ Global Config: [TEMP_HOME]/.config/worktrunk/config.toml
- worktree-path = "../{main-worktree}.{branch}"
+ ⚪ Global Config: [TEMP_HOME]/.config/worktrunk/config.toml
+   worktree-path = "../{main-worktree}.{branch}"
- ⚪ Project Config: Not in a git repository
+ ⚪ Project Config: Not in a git repository
----- stderr -----
"#);
diff --git a/tests/snapshots/integration__integration_tests__init__init_bash.snap b/tests/snapshots/integration__integration_tests__init__init_bash.snap
index 40d2e6730..8da83d212 100644
--- a/tests/snapshots/integration__integration_tests__init__init_bash.snap
+++ b/tests/snapshots/integration__integration_tests__init__init_bash.snap
@@ -15,7 +15,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpYm4xND/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpbBYDwj/test-config.toml
---
success: true
exit_code: 0
@@ -150,9 +150,6 @@ _wt() {
wt,complete)
cmd="wt__complete"
;;
- wt,completion)
- cmd="wt__completion"
- ;;
wt,config)
cmd="wt__config"
;;
@@ -214,7 +211,7 @@ _wt() {
case "${cmd}" in
wt)
- opts="-v -h -V --verbose --help --version init config beta list switch remove merge completion complete"
+ opts="-v -h -V --verbose --help --version init config beta list switch remove merge complete"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
@@ -353,20 +350,6 @@ _wt() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
- wt__completion)
- opts="-v -h --verbose --help bash elvish fish nushell oil powershell xonsh zsh"
- if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
- COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
- return 0
- fi
- case "${prev}" in
- *)
- COMPREPLY=()
- ;;
- esac
- COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
- return 0
- ;;
wt__config)
opts="-v -h --verbose --help init list help refresh-cache shell"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
diff --git a/tests/snapshots/integration__integration_tests__init__init_fish.snap b/tests/snapshots/integration__integration_tests__init__init_fish.snap
index 118dc435b..6f9e07192 100644
--- a/tests/snapshots/integration__integration_tests__init__init_fish.snap
+++ b/tests/snapshots/integration__integration_tests__init__init_fish.snap
@@ -15,7 +15,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp0hMTyP/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp0566RD/test-config.toml
---
success: true
exit_code: 0
@@ -166,7 +166,6 @@ if type -q wt; or set -q WORKTRUNK_BIN
complete -c wt -n '__fish_seen_subcommand_from switch' -f -a '(__wt_complete)' -d 'Branch name, worktree path, '@' for current HEAD, or '-' for previous branch'
complete -c wt -n '__fish_seen_subcommand_from remove' -f -a '(__wt_complete)' -d 'Worktree names or branches to remove (use '@' for current, defaults to current if none specified)'
complete -c wt -n '__fish_seen_subcommand_from merge' -f -a '(__wt_complete)' -d 'Target branch to merge into (defaults to default branch)'
- complete -c wt -n '__fish_seen_subcommand_from completion' -f -a '(__wt_complete)' -d 'Shell to generate completions for'
complete -c wt -n '__fish_seen_subcommand_from complete' -f -a '(__wt_complete)' -d 'Arguments to complete'
end
@@ -244,15 +243,15 @@ complete -c wt -n "__fish_wt_using_subcommand beta; and not __fish_seen_subcomma
complete -c wt -n "__fish_wt_using_subcommand beta; and not __fish_seen_subcommand_from run-hook commit squash push rebase ask-approvals select" -f -a "rebase" -d 'Rebase current branch onto target branch'
complete -c wt -n "__fish_wt_using_subcommand beta; and not __fish_seen_subcommand_from run-hook commit squash push rebase ask-approvals select" -f -a "ask-approvals" -d 'Approve commands in the project config (shows unapproved by default)'
complete -c wt -n "__fish_wt_using_subcommand beta; and not __fish_seen_subcommand_from run-hook commit squash push rebase ask-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 f -l force -d 'Skip command approval prompts'
+complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from run-hook" -s f -l force -d 'Auto-approve project commands without saving approvals'
complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from run-hook" -s v -l verbose -d 'Enable verbose output (show git 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 f -l force -d 'Skip command approval prompts'
-complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from commit" -l no-verify -d 'Skip all project hooks (pre-commit-command)'
+complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from commit" -s f -l force -d 'Auto-approve project commands without saving approvals'
+complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from commit" -l no-verify -d 'Skip pre-commit project hooks'
complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from commit" -s v -l verbose -d 'Enable verbose output (show git 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 f -l force -d 'Skip command approval prompts'
-complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from squash" -l no-verify -d 'Skip all project hooks (pre-commit-command, pre-merge-command)'
+complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from squash" -s f -l force -d 'Auto-approve project commands without saving approvals'
+complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from squash" -l no-verify -d 'Skip pre-commit project hooks'
complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from squash" -s v -l verbose -d 'Enable verbose output (show git 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" -l allow-merge-commits -d 'Allow pushing merge commits (non-linear history)'
@@ -260,7 +259,7 @@ complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_f
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 v -l verbose -d 'Enable verbose output (show git 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 f -l force -d 'Skip command approval prompts'
+complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from ask-approvals" -s f -l force -d 'Auto-approve project commands without saving approvals'
complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from ask-approvals" -l all -d 'Show all commands including already-approved ones'
complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from ask-approvals" -s v -l verbose -d 'Enable verbose output (show git 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'
@@ -275,8 +274,8 @@ complete -c wt -n "__fish_wt_using_subcommand list" -s h -l help -d 'Print help
complete -c wt -n "__fish_wt_using_subcommand switch" -s b -l base -d 'Base branch to create from (only with --create). Use \'@\' for current HEAD' -r
complete -c wt -n "__fish_wt_using_subcommand switch" -s x -l execute -d 'Execute command after switching' -r
complete -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 confirmation prompt'
-complete -c wt -n "__fish_wt_using_subcommand switch" -l no-verify -d 'Skip all project hooks (post-create, post-start)'
+complete -c wt -n "__fish_wt_using_subcommand switch" -s f -l force -d 'Auto-approve project commands without saving approvals'
+complete -c wt -n "__fish_wt_using_subcommand switch" -l no-verify -d 'Skip all project hooks: post-create and post-start'
complete -c wt -n "__fish_wt_using_subcommand switch" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'
complete -c wt -n "__fish_wt_using_subcommand switch" -s h -l help -d 'Print help'
complete -c wt -n "__fish_wt_using_subcommand remove" -l no-delete-branch -d 'Don\'t delete the branch after removing the worktree (by default, branches are deleted)'
@@ -284,14 +283,12 @@ complete -c wt -n "__fish_wt_using_subcommand remove" -s v -l verbose -d 'Enable
complete -c wt -n "__fish_wt_using_subcommand remove" -s h -l help -d 'Print help'
complete -c wt -n "__fish_wt_using_subcommand merge" -l no-squash -d 'Disable squashing commits (by default, commits are squashed into one before merging)'
complete -c wt -n "__fish_wt_using_subcommand merge" -l no-commit -d 'Push commits as-is without transformations (requires clean tree; implies --no-squash, --no-remove, and skips rebase)'
-complete -c wt -n "__fish_wt_using_subcommand merge" -l no-remove -d 'Keep worktree after merging (don\'t remove)'
-complete -c wt -n "__fish_wt_using_subcommand merge" -l no-verify -d 'Skip all project hooks (pre-merge-command)'
-complete -c wt -n "__fish_wt_using_subcommand merge" -s f -l force -d 'Skip approval prompts for commands'
+complete -c wt -n "__fish_wt_using_subcommand merge" -l no-remove -d 'Keep the worktree after merging'
+complete -c wt -n "__fish_wt_using_subcommand merge" -l no-verify -d 'Skip pre-merge project hooks'
+complete -c wt -n "__fish_wt_using_subcommand merge" -s f -l force -d 'Auto-approve project commands without saving approvals'
complete -c wt -n "__fish_wt_using_subcommand merge" -l tracked-only -d 'Only stage tracked files (git add -u) instead of all files (git add -A)'
complete -c wt -n "__fish_wt_using_subcommand merge" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'
complete -c wt -n "__fish_wt_using_subcommand merge" -s h -l help -d 'Print help (see more with \'--help\')'
-complete -c wt -n "__fish_wt_using_subcommand completion" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'
-complete -c wt -n "__fish_wt_using_subcommand completion" -s h -l help -d 'Print help'
complete -c wt -n "__fish_wt_using_subcommand complete" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'
complete -c wt -n "__fish_wt_using_subcommand complete" -s h -l help -d 'Print help'
diff --git a/tests/snapshots/integration__integration_tests__init__init_zsh.snap b/tests/snapshots/integration__integration_tests__init__init_zsh.snap
index 55e75c11b..80164e517 100644
--- a/tests/snapshots/integration__integration_tests__init__init_zsh.snap
+++ b/tests/snapshots/integration__integration_tests__init__init_zsh.snap
@@ -15,7 +15,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpda32N5/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpcRX9We/test-config.toml
---
success: true
exit_code: 0
@@ -262,8 +262,8 @@ _arguments "${_arguments_options[@]}" : \
case $line[1] in
(run-hook)
_arguments "${_arguments_options[@]}" : \
-'-f[Skip command approval prompts]' \
-'--force[Skip command approval prompts]' \
+'-f[Auto-approve project commands without saving approvals]' \
+'--force[Auto-approve project commands without saving approvals]' \
'-v[Enable verbose output (show git commands and debug info)]' \
'--verbose[Enable verbose output (show git commands and debug info)]' \
'-h[Print help]' \
@@ -273,9 +273,9 @@ _arguments "${_arguments_options[@]}" : \
;;
(commit)
_arguments "${_arguments_options[@]}" : \
-'-f[Skip command approval prompts]' \
-'--force[Skip command approval prompts]' \
-'--no-verify[Skip all project hooks (pre-commit-command)]' \
+'-f[Auto-approve project commands without saving approvals]' \
+'--force[Auto-approve project commands without saving approvals]' \
+'--no-verify[Skip pre-commit project hooks]' \
'-v[Enable verbose output (show git commands and debug info)]' \
'--verbose[Enable verbose output (show git commands and debug info)]' \
'-h[Print help]' \
@@ -284,9 +284,9 @@ _arguments "${_arguments_options[@]}" : \
;;
(squash)
_arguments "${_arguments_options[@]}" : \
-'-f[Skip command approval prompts]' \
-'--force[Skip command approval prompts]' \
-'--no-verify[Skip all project hooks (pre-commit-command, pre-merge-command)]' \
+'-f[Auto-approve project commands without saving approvals]' \
+'--force[Auto-approve project commands without saving approvals]' \
+'--no-verify[Skip pre-commit project hooks]' \
'-v[Enable verbose output (show git commands and debug info)]' \
'--verbose[Enable verbose output (show git commands and debug info)]' \
'-h[Print help]' \
@@ -315,8 +315,8 @@ _arguments "${_arguments_options[@]}" : \
;;
(ask-approvals)
_arguments "${_arguments_options[@]}" : \
-'-f[Skip command approval prompts]' \
-'--force[Skip command approval prompts]' \
+'-f[Auto-approve project commands without saving approvals]' \
+'--force[Auto-approve project commands without saving approvals]' \
'--all[Show all commands including already-approved ones]' \
'-v[Enable verbose output (show git commands and debug info)]' \
'--verbose[Enable verbose output (show git commands and debug info)]' \
@@ -356,9 +356,9 @@ _arguments "${_arguments_options[@]}" : \
'--execute=[Execute command after switching]:EXECUTE:_default' \
'-c[Create a new branch]' \
'--create[Create a new branch]' \
-'-f[Skip confirmation prompt]' \
-'--force[Skip confirmation prompt]' \
-'--no-verify[Skip all project hooks (post-create, post-start)]' \
+'-f[Auto-approve project commands without saving approvals]' \
+'--force[Auto-approve project commands without saving approvals]' \
+'--no-verify[Skip all project hooks\: post-create and post-start]' \
'-v[Enable verbose output (show git commands and debug info)]' \
'--verbose[Enable verbose output (show git commands and debug info)]' \
'-h[Print help]' \
@@ -380,10 +380,10 @@ _arguments "${_arguments_options[@]}" : \
_arguments "${_arguments_options[@]}" : \
'--no-squash[Disable squashing commits (by default, commits are squashed into one before merging)]' \
'--no-commit[Push commits as-is without transformations (requires clean tree; implies --no-squash, --no-remove, and skips rebase)]' \
-'--no-remove[Keep worktree after merging (don'\''t remove)]' \
-'--no-verify[Skip all project hooks (pre-merge-command)]' \
-'-f[Skip approval prompts for commands]' \
-'--force[Skip approval prompts for commands]' \
+'--no-remove[Keep the worktree after merging]' \
+'--no-verify[Skip pre-merge project hooks]' \
+'-f[Auto-approve project commands without saving approvals]' \
+'--force[Auto-approve project commands without saving approvals]' \
'--tracked-only[Only stage tracked files (git add -u) instead of all files (git add -A)]' \
'-v[Enable verbose output (show git commands and debug info)]' \
'--verbose[Enable verbose output (show git commands and debug info)]' \
@@ -392,15 +392,6 @@ _arguments "${_arguments_options[@]}" : \
'::target -- Target branch to merge into (defaults to default branch):_default' \
&& ret=0
;;
-(completion)
-_arguments "${_arguments_options[@]}" : \
-'-v[Enable verbose output (show git commands and debug info)]' \
-'--verbose[Enable verbose output (show git commands and debug info)]' \
-'-h[Print help]' \
-'--help[Print help]' \
-':shell -- Shell to generate completions for:(bash elvish fish nushell oil powershell xonsh zsh)' \
-&& ret=0
-;;
(complete)
_arguments "${_arguments_options[@]}" : \
'-v[Enable verbose output (show git commands and debug info)]' \
@@ -425,7 +416,6 @@ _wt_commands() {
'switch:Switch to a worktree' \
'remove:Finish current worktree, returning to primary if current' \
'merge:Merge worktree into target branch' \
-'completion:Generate shell completion script (deprecated - use init instead)' \
'complete:Internal completion helper (hidden)' \
)
_describe -t commands 'wt commands' commands "$@"
@@ -483,11 +473,6 @@ _wt__complete_commands() {
local commands; commands=()
_describe -t commands 'wt complete commands' commands "$@"
}
-(( $+functions[_wt__completion_commands] )) ||
-_wt__completion_commands() {
- local commands; commands=()
- _describe -t commands 'wt completion commands' commands "$@"
-}
(( $+functions[_wt__config_commands] )) ||
_wt__config_commands() {
local commands; commands=(