Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
feat: rename `dev` command to `beta` and update snapshots
Maximilian Roos41a632ec3392
diff --git a/src/commands/dev.rs b/src/commands/beta.rssimilarity index 95%rename from src/commands/dev.rsrename to src/commands/beta.rsindex c6c816216..fae232637 100644--- a/src/commands/dev.rs+++ b/src/commands/beta.rs@@ -12,8 +12,8 @@ use super::merge::{};use super::worktree::{execute_post_create_commands, execute_post_start_commands_sequential};-/// Handle `wt dev run-hook` command-pub fn handle_dev_run_hook(hook_type: HookType, force: bool) -> Result<(), GitError> {+/// Handle `wt beta run-hook` command+pub fn handle_beta_run_hook(hook_type: HookType, force: bool) -> Result<(), GitError> {// Derive context from current environmentlet repo = Repository::current();let worktree_path = std::env::current_dir()@@ -117,8 +117,8 @@ fn check_hook_configured<T>(hook: &Option<T>, hook_type: HookType) -> Result<(),Ok(())}-/// Handle `wt dev commit` command-pub fn handle_dev_commit(force: bool, no_verify: bool) -> Result<(), GitError> {+/// Handle `wt beta commit` command+pub fn handle_beta_commit(force: bool, no_verify: bool) -> Result<(), GitError> {let repo = Repository::current();let config = WorktrunkConfig::load().git_context("Failed to load config")?;let current_branch = repo@@ -149,13 +149,13 @@ pub fn handle_dev_commit(force: bool, no_verify: bool) -> Result<(), GitError> {commit_staged_changes(&config.commit_generation, false)}-/// Handle `wt dev squash` command+/// Handle `wt beta squash` command////// # Arguments/// * `auto_trust` - If true, skip approval prompts for pre-commit commands (already approved in batch)////// Returns true if a commit or squash operation occurred, false if nothing needed to be done-pub fn handle_dev_squash(+pub fn handle_beta_squash(target: Option<&str>,force: bool,no_verify: bool,@@ -306,8 +306,8 @@ pub fn handle_dev_squash(Ok(true)}-/// Handle `wt dev push` command-pub fn handle_dev_push(target: Option<&str>, allow_merge_commits: bool) -> Result<(), GitError> {+/// Handle `wt beta push` command+pub fn handle_beta_push(target: Option<&str>, allow_merge_commits: bool) -> Result<(), GitError> {super::worktree::handle_push(target,allow_merge_commits,@@ -318,9 +318,9 @@ pub fn handle_dev_push(target: Option<&str>, allow_merge_commits: bool) -> Resul)}-/// Handle `wt dev rebase` command+/// Handle `wt beta rebase` command/// Returns true if rebasing occurred, false if already up-to-date-pub fn handle_dev_rebase(target: Option<&str>) -> Result<bool, GitError> {+pub fn handle_beta_rebase(target: Option<&str>) -> Result<bool, GitError> {let repo = Repository::current();// Get target branch (default to default branch if not provided)@@ -386,8 +386,8 @@ pub fn handle_dev_rebase(target: Option<&str>) -> Result<bool, GitError> {Ok(true)}-/// Handle `wt dev ask-approvals` command - approve all commands in the project-pub fn handle_dev_ask_approvals(force: bool, show_all: bool) -> Result<(), GitError> {+/// Handle `wt beta ask-approvals` command - approve all commands in the project+pub fn handle_beta_ask_approvals(force: bool, show_all: bool) -> Result<(), GitError> {use super::command_approval::approve_command_batch;use worktrunk::config::{CommandPhase, WorktrunkConfig};diff --git a/src/commands/merge.rs b/src/commands/merge.rsindex f9a448691..d6640a727 100644--- a/src/commands/merge.rs+++ b/src/commands/merge.rs@@ -199,7 +199,7 @@ pub fn handle_merge(// Rebase onto target (skip if --no-commit) - track whether rebasing occurredlet rebased = if !no_commit {- super::dev::handle_dev_rebase(Some(&target_branch))?+ super::beta::handle_beta_rebase(Some(&target_branch))?} else {false};@@ -464,9 +464,9 @@ fn handle_commit_changes(}fn handle_squash(target_branch: &str, no_verify: bool, force: bool) -> Result<bool, GitError> {- // Delegate to the atomic dev command+ // Delegate to the atomic beta command// auto_trust=true because commands already approved in merge batch- super::dev::handle_dev_squash(Some(target_branch), force, no_verify, true)+ super::beta::handle_beta_squash(Some(target_branch), force, no_verify, true)}/// Run pre-merge commands sequentially (blocking, fail-fast)diff --git a/src/commands/mod.rs b/src/commands/mod.rsindex f6c1c3f1b..8f79ca416 100644--- a/src/commands/mod.rs+++ b/src/commands/mod.rs@@ -1,9 +1,9 @@+pub mod beta;pub mod command_approval;mod command_executor;pub mod completion;pub mod config;pub mod configure_shell;-pub mod dev;pub mod init;pub mod list;pub mod merge;@@ -11,15 +11,15 @@ pub mod process;pub mod select;pub mod worktree;+pub use beta::{+ handle_beta_ask_approvals, handle_beta_commit, handle_beta_push, handle_beta_rebase,+ handle_beta_run_hook, handle_beta_squash,+};pub use completion::{handle_complete, handle_completion};pub use config::{handle_config_help, handle_config_init, handle_config_list, handle_config_refresh_cache,};pub use configure_shell::{ConfigAction, handle_configure_shell};-pub use dev::{- handle_dev_ask_approvals, handle_dev_commit, handle_dev_push, handle_dev_rebase,- handle_dev_run_hook, handle_dev_squash,-};pub use init::handle_init;pub use list::handle_list;pub use merge::handle_merge;diff --git a/src/main.rs b/src/main.rsindex b6bdeefd0..33a38a0a5 100644--- a/src/main.rs+++ b/src/main.rs@@ -30,11 +30,11 @@ mod output;use commands::worktree::SwitchResult;use commands::{- ConfigAction, Shell, handle_complete, handle_completion, handle_config_help,- handle_config_init, handle_config_list, handle_config_refresh_cache, handle_configure_shell,- handle_dev_ask_approvals, handle_dev_commit, handle_dev_push, handle_dev_rebase,- handle_dev_run_hook, handle_dev_squash, handle_init, handle_list, handle_merge, handle_remove,- handle_select, handle_switch,+ ConfigAction, Shell, handle_beta_ask_approvals, handle_beta_commit, handle_beta_push,+ handle_beta_rebase, handle_beta_run_hook, handle_beta_squash, 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_select, handle_switch,};use output::{execute_user_command, handle_remove_output, handle_switch_output};@@ -87,7 +87,7 @@ enum ConfigCommand {}#[derive(Subcommand)]-enum DevCommand {+enum BetaCommand {/// Run a project hook for testingRunHook {/// Hook type to run@@ -170,9 +170,9 @@ enum Commands {/// Development and testing utilities#[command(hide = true)]- Dev {+ Beta {#[command(subcommand)]- action: DevCommand,+ action: BetaCommand,},/// List worktrees and optionally branches@@ -593,21 +593,21 @@ fn main() {.git_err()}},- Commands::Dev { action } => match action {- DevCommand::RunHook { hook_type, force } => handle_dev_run_hook(hook_type, force),- DevCommand::Commit { force, no_verify } => handle_dev_commit(force, no_verify),- DevCommand::Squash {+ Commands::Beta { action } => match action {+ BetaCommand::RunHook { hook_type, force } => handle_beta_run_hook(hook_type, force),+ BetaCommand::Commit { force, no_verify } => handle_beta_commit(force, no_verify),+ BetaCommand::Squash {target,force,no_verify,- } => handle_dev_squash(target.as_deref(), force, no_verify, false).map(|_| ()),- DevCommand::Push {+ } => handle_beta_squash(target.as_deref(), force, no_verify, false).map(|_| ()),+ BetaCommand::Push {target,allow_merge_commits,- } => handle_dev_push(target.as_deref(), allow_merge_commits),- DevCommand::Rebase { target } => handle_dev_rebase(target.as_deref()).map(|_| ()),- DevCommand::AskApprovals { force, all } => handle_dev_ask_approvals(force, all),- DevCommand::Select => handle_select(),+ } => handle_beta_push(target.as_deref(), allow_merge_commits),+ BetaCommand::Rebase { target } => handle_beta_rebase(target.as_deref()).map(|_| ()),+ BetaCommand::AskApprovals { force, all } => handle_beta_ask_approvals(force, all),+ BetaCommand::Select => handle_select(),},Commands::List {format,diff --git a/templates/bash.sh b/templates/bash.shindex 0995c2001..df5439bff 100644--- a/templates/bash.sh+++ b/templates/bash.sh@@ -86,8 +86,8 @@ if command -v wt >/dev/null 2>&1 || [[ -n "${WORKTRUNK_BIN:-}" ]]; then# Commands that need --internal for directory change support_wt_exec --internal "${args[@]}";;- dev)- # Check if dev subcommand is select+ beta)+ # Check if beta subcommand is selectif [[ ${{ '{' }}#args[@]} -gt 1 ]] && [[ "${args[1]}" == "select" ]]; then_wt_exec --internal "${args[@]}"elsediff --git a/templates/elvish.elv b/templates/elvish.elvindex 23e11cd86..c169d332c 100644--- a/templates/elvish.elv+++ b/templates/elvish.elv@@ -92,8 +92,8 @@ if (or (has-external wt) (has-env WORKTRUNK_BIN)) {# Commands that need --internal for directory change supportvar rest-args = $filtered-args[1..]_wt_exec --internal $subcommand $@rest-args- } elif (eq $subcommand "dev") {- # Check if dev subcommand is select+ } elif (eq $subcommand "beta") {+ # Check if beta subcommand is selectif (and (> (count $filtered-args) 1) (eq $filtered-args[1] "select")) {_wt_exec --internal $@filtered-args} else {diff --git a/templates/fish.fish b/templates/fish.fishindex de1d5f1f1..0429dc06e 100644--- a/templates/fish.fish+++ b/templates/fish.fish@@ -121,8 +121,8 @@ if type -q {{ cmd_prefix }}; or set -q WORKTRUNK_BINcase switch remove merge# Commands that need --internal for directory change support_wt_exec --internal $args- case dev- # Check if dev subcommand is select+ case beta+ # Check if beta subcommand is selectif test (count $args) -gt 1; and test "$args[2]" = "select"_wt_exec --internal $argselsediff --git a/templates/nushell.nu b/templates/nushell.nuindex 035e07d40..f183d26ea 100644--- a/templates/nushell.nu+++ b/templates/nushell.nu@@ -76,8 +76,8 @@ if (which wt | is-not-empty) or ($env.WORKTRUNK_BIN? | is-not-empty) {let exit_code = (_wt_exec $cmd ...$internal_args)return $exit_code}- "dev" => {- # Check if dev subcommand is select+ "beta" => {+ # Check if beta subcommand is selectlet dev_subcommand = ($filtered_args | get 1? | default "")if $dev_subcommand == "select" {let exit_code = (_wt_exec $cmd --internal ...$filtered_args)diff --git a/templates/powershell.ps1 b/templates/powershell.ps1index 023bc101e..2109898a1 100644--- a/templates/powershell.ps1+++ b/templates/powershell.ps1@@ -95,8 +95,8 @@ if ((Get-Command wt -ErrorAction SilentlyContinue) -or $env:WORKTRUNK_BIN) {$exitCode = _wt_exec -Command $cmd --internal $subcommand @restArgsreturn $exitCode}- "dev" {- # Check if dev subcommand is select+ "beta" {+ # Check if beta subcommand is selectif ($filteredArgs.Count -gt 1 -and $filteredArgs[1] -eq "select") {$exitCode = _wt_exec -Command $cmd --internal @filteredArgsreturn $exitCodediff --git a/templates/xonsh.xsh b/templates/xonsh.xshindex f3b605e53..351ce58f2 100644--- a/templates/xonsh.xsh+++ b/templates/xonsh.xsh@@ -76,8 +76,8 @@ if shutil.which("wt") is not None or os.environ.get('WORKTRUNK_BIN'):# Commands that need --internal for directory change supportrest_args = filtered_args[1:]return _wt_exec(["--internal", subcommand] + rest_args, cmd=cmd)- elif subcommand == "dev":- # Check if dev subcommand is select+ elif subcommand == "beta":+ # Check if beta subcommand is selectif len(filtered_args) > 1 and filtered_args[1] == "select":return _wt_exec(["--internal"] + filtered_args, cmd=cmd)else:diff --git a/templates/zsh.zsh b/templates/zsh.zshindex 35e1e13a4..4bf366dc2 100644--- a/templates/zsh.zsh+++ b/templates/zsh.zsh@@ -67,8 +67,8 @@ if command -v wt >/dev/null 2>&1 || [[ -n "${WORKTRUNK_BIN:-}" ]]; thenshift_wt_exec --internal "$subcommand" "$@";;- dev)- # Check if dev subcommand is select+ beta)+ # Check if beta subcommand is selectif [[ "$2" == "select" ]]; then_wt_exec --internal "$@"elsediff --git a/tests/integration_tests/push.rs b/tests/integration_tests/push.rsindex c81f20393..833902771 100644--- a/tests/integration_tests/push.rs+++ b/tests/integration_tests/push.rs@@ -6,10 +6,10 @@ use std::process::Command;fn snapshot_push(test_name: &str, repo: &TestRepo, args: &[&str], cwd: Option<&std::path::Path>) {let settings = setup_snapshot_settings(repo);settings.bind(|| {- // Prepend "push" to args for `wt dev push` command- let mut dev_args = vec!["push"];- dev_args.extend_from_slice(args);- let mut cmd = make_snapshot_cmd(repo, "dev", &dev_args, cwd);+ // Prepend "push" to args for `wt beta push` command+ let mut beta_args = vec!["push"];+ beta_args.extend_from_slice(args);+ let mut cmd = make_snapshot_cmd(repo, "beta", &beta_args, cwd);assert_cmd_snapshot!(test_name, cmd);});}diff --git a/tests/snapshots/integration__integration_tests__init__init_bash.snap b/tests/snapshots/integration__integration_tests__init__init_bash.snapindex 1029bde00..fff5dd2bd 100644--- a/tests/snapshots/integration__integration_tests__init__init_bash.snap+++ b/tests/snapshots/integration__integration_tests__init__init_bash.snap@@ -16,7 +16,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpAVt9Qw/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpA4ttAG/test-config.toml---success: trueexit_code: 0@@ -109,8 +109,8 @@ if command -v wt >/dev/null 2>&1 || [[ -n "${WORKTRUNK_BIN:-}" ]]; then# Commands that need --internal for directory change support_wt_exec --internal "${args[@]}";;- dev)- # Check if dev subcommand is select+ beta)+ # Check if beta subcommand is selectif [[ ${#args[@]} -gt 1 ]] && [[ "${args[1]}" == "select" ]]; then_wt_exec --internal "${args[@]}"else@@ -165,6 +165,9 @@ _wt() {",$1")cmd="wt";;+ wt,beta)+ cmd="wt__beta"+ ;;wt,complete)cmd="wt__complete";;@@ -174,9 +177,6 @@ _wt() {wt,config)cmd="wt__config";;- wt,dev)- cmd="wt__dev"- ;;wt,init)cmd="wt__init";;@@ -192,6 +192,27 @@ _wt() {wt,switch)cmd="wt__switch";;+ wt__beta,ask-approvals)+ cmd="wt__beta__ask__approvals"+ ;;+ wt__beta,commit)+ cmd="wt__beta__commit"+ ;;+ wt__beta,push)+ cmd="wt__beta__push"+ ;;+ wt__beta,rebase)+ cmd="wt__beta__rebase"+ ;;+ wt__beta,run-hook)+ cmd="wt__beta__run__hook"+ ;;+ wt__beta,select)+ cmd="wt__beta__select"+ ;;+ wt__beta,squash)+ cmd="wt__beta__squash"+ ;;wt__config,help)cmd="wt__config__help";;@@ -207,27 +228,6 @@ _wt() {wt__config,shell)cmd="wt__config__shell";;- wt__dev,ask-approvals)- cmd="wt__dev__ask__approvals"- ;;- wt__dev,commit)- cmd="wt__dev__commit"- ;;- wt__dev,push)- cmd="wt__dev__push"- ;;- wt__dev,rebase)- cmd="wt__dev__rebase"- ;;- wt__dev,run-hook)- cmd="wt__dev__run__hook"- ;;- wt__dev,select)- cmd="wt__dev__select"- ;;- wt__dev,squash)- cmd="wt__dev__squash"- ;;*);;esac@@ -235,7 +235,7 @@ _wt() {case "${cmd}" inwt)- opts="-v -h -V --verbose --help --version init config dev list switch remove merge completion complete"+ opts="-v -h -V --verbose --help --version init config beta list switch remove merge completion complete"if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -248,8 +248,8 @@ _wt() {COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0;;- wt__complete)- opts="-v -h --verbose --help [ARGS]..."+ wt__beta)+ opts="-v -h --verbose --help run-hook commit squash push rebase ask-approvals select"if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -262,9 +262,9 @@ _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+ wt__beta__ask__approvals)+ opts="-f -v -h --force --all --verbose --help"+ if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0fi@@ -276,9 +276,9 @@ _wt() {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+ wt__beta__commit)+ opts="-f -v -h --force --no-verify --verbose --help"+ if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0fi@@ -290,8 +290,8 @@ _wt() {COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0;;- wt__config__help)- opts="-v -h --verbose --help"+ wt__beta__push)+ opts="-v -h --allow-merge-commits --verbose --help [TARGET]"if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -304,8 +304,8 @@ _wt() {COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0;;- wt__config__init)- opts="-v -h --verbose --help"+ wt__beta__rebase)+ opts="-v -h --verbose --help [TARGET]"if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -318,8 +318,8 @@ _wt() {COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0;;- wt__config__list)- opts="-v -h --verbose --help"+ wt__beta__run__hook)+ opts="-f -v -h --force --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@@ -332,7 +332,7 @@ _wt() {COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0;;- wt__config__refresh__cache)+ wt__beta__select)opts="-v -h --verbose --help"if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )@@ -346,17 +346,13 @@ _wt() {COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0;;- wt__config__shell)- opts="-f -v -h --shell --force --verbose --help"+ wt__beta__squash)+ opts="-f -v -h --force --no-verify --verbose --help [TARGET]"if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0ficase "${prev}" in- --shell)- COMPREPLY=($(compgen -W "bash elvish fish nushell oil powershell xonsh zsh" -- "${cur}"))- return 0- ;;*)COMPREPLY=();;@@ -364,8 +360,8 @@ _wt() {COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0;;- wt__dev)- opts="-v -h --verbose --help run-hook commit squash push rebase ask-approvals select"+ wt__complete)+ opts="-v -h --verbose --help [ARGS]..."if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -378,9 +374,9 @@ _wt() {COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0;;- wt__dev__ask__approvals)- opts="-f -v -h --force --all --verbose --help"- if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then+ wt__completion)+ opts="-v -h --verbose --help bash elvish fish nushell oil powershell xonsh zsh"+ if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0fi@@ -392,9 +388,9 @@ _wt() {COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0;;- wt__dev__commit)- opts="-f -v -h --force --no-verify --verbose --help"- if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then+ wt__config)+ opts="-v -h --verbose --help init list help refresh-cache shell"+ if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0fi@@ -406,8 +402,8 @@ _wt() {COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0;;- wt__dev__push)- opts="-v -h --allow-merge-commits --verbose --help [TARGET]"+ wt__config__help)+ opts="-v -h --verbose --help"if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -420,8 +416,8 @@ _wt() {COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0;;- wt__dev__rebase)- opts="-v -h --verbose --help [TARGET]"+ wt__config__init)+ opts="-v -h --verbose --help"if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -434,8 +430,8 @@ _wt() {COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0;;- wt__dev__run__hook)- opts="-f -v -h --force --verbose --help post-create post-start pre-commit pre-merge post-merge"+ wt__config__list)+ opts="-v -h --verbose --help"if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -448,7 +444,7 @@ _wt() {COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0;;- wt__dev__select)+ wt__config__refresh__cache)opts="-v -h --verbose --help"if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )@@ -462,13 +458,17 @@ _wt() {COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0;;- wt__dev__squash)- opts="-f -v -h --force --no-verify --verbose --help [TARGET]"+ wt__config__shell)+ opts="-f -v -h --shell --force --verbose --help"if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0ficase "${prev}" in+ --shell)+ COMPREPLY=($(compgen -W "bash elvish fish nushell oil powershell xonsh zsh" -- "${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 9d80f2c6e..003f854da 100644--- a/tests/snapshots/integration__integration_tests__init__init_fish.snap+++ b/tests/snapshots/integration__integration_tests__init__init_fish.snap@@ -16,7 +16,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpAEvMAL/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmppG1KoR/test-config.toml---success: trueexit_code: 0@@ -144,8 +144,8 @@ if type -q wt; or set -q WORKTRUNK_BINcase switch remove merge# Commands that need --internal for directory change support_wt_exec --internal $args- case dev- # Check if dev subcommand is select+ case beta+ # Check if beta subcommand is selectif test (count $args) -gt 1; and test "$args[2]" = "select"_wt_exec --internal $argselse@@ -175,10 +175,10 @@ if type -q wt; or set -q WORKTRUNK_BIN# Register dynamic completionscomplete -c wt -n '__fish_seen_subcommand_from init' -f -a '(__wt_complete)' -d 'Shell to generate code for'- complete -c wt -n '__fish_seen_subcommand_from dev; and __fish_seen_subcommand_from run-hook' -f -a '(__wt_complete)' -d 'Hook type to run'- complete -c wt -n '__fish_seen_subcommand_from dev; and __fish_seen_subcommand_from squash' -f -a '(__wt_complete)' -d 'Target branch to squash against (defaults to default branch)'- complete -c wt -n '__fish_seen_subcommand_from dev; and __fish_seen_subcommand_from push' -f -a '(__wt_complete)' -d 'Target branch (defaults to default branch)'- complete -c wt -n '__fish_seen_subcommand_from dev; and __fish_seen_subcommand_from rebase' -f -a '(__wt_complete)' -d 'Target branch to rebase onto (defaults to default branch)'+ complete -c wt -n '__fish_seen_subcommand_from beta; and __fish_seen_subcommand_from run-hook' -f -a '(__wt_complete)' -d 'Hook type to run'+ complete -c wt -n '__fish_seen_subcommand_from beta; and __fish_seen_subcommand_from squash' -f -a '(__wt_complete)' -d 'Target branch to squash against (defaults to default branch)'+ complete -c wt -n '__fish_seen_subcommand_from beta; and __fish_seen_subcommand_from push' -f -a '(__wt_complete)' -d 'Target branch (defaults to default branch)'+ complete -c wt -n '__fish_seen_subcommand_from beta; and __fish_seen_subcommand_from rebase' -f -a '(__wt_complete)' -d 'Target branch to rebase onto (defaults to default branch)'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)'@@ -218,7 +218,7 @@ complete -c wt -n "__fish_wt_needs_command" -s h -l help -d 'Print 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 "init" -d 'Generate shell integration code'complete -c wt -n "__fish_wt_needs_command" -f -a "config" -d 'Manage configuration'-complete -c wt -n "__fish_wt_needs_command" -f -a "dev" -d 'Development and testing utilities'+complete -c wt -n "__fish_wt_needs_command" -f -a "beta" -d 'Development and testing utilities'complete -c wt -n "__fish_wt_needs_command" -f -a "list" -d 'List worktrees and optionally branches'complete -c wt -n "__fish_wt_needs_command" -f -a "switch" -d 'Switch to a worktree'complete -c wt -n "__fish_wt_needs_command" -f -a "remove" -d 'Finish current worktree, returning to primary if current'@@ -251,37 +251,37 @@ zsh\t''"complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from shell" -s f -l force -d 'Skip confirmation prompt'complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from shell" -s v -l verbose -d 'Enable verbose output (show git 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 dev; and not __fish_seen_subcommand_from run-hook commit squash push rebase ask-approvals select" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'-complete -c wt -n "__fish_wt_using_subcommand dev; and not __fish_seen_subcommand_from run-hook commit squash push rebase ask-approvals select" -s h -l help -d 'Print help'-complete -c wt -n "__fish_wt_using_subcommand dev; and not __fish_seen_subcommand_from run-hook commit squash push rebase ask-approvals select" -f -a "run-hook" -d 'Run a project hook for testing'-complete -c wt -n "__fish_wt_using_subcommand dev; and not __fish_seen_subcommand_from run-hook commit squash push rebase ask-approvals select" -f -a "commit" -d 'Commit changes with LLM-generated message'-complete -c wt -n "__fish_wt_using_subcommand dev; and not __fish_seen_subcommand_from run-hook commit squash push rebase ask-approvals select" -f -a "squash" -d 'Squash commits with LLM-generated message'-complete -c wt -n "__fish_wt_using_subcommand dev; and not __fish_seen_subcommand_from run-hook commit squash push rebase ask-approvals select" -f -a "push" -d 'Push changes to target branch'-complete -c wt -n "__fish_wt_using_subcommand dev; 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 dev; 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 dev; 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 dev; and __fish_seen_subcommand_from run-hook" -s f -l force -d 'Skip command approval prompts'-complete -c wt -n "__fish_wt_using_subcommand dev; 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 dev; and __fish_seen_subcommand_from run-hook" -s h -l help -d 'Print help'-complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from commit" -s f -l force -d 'Skip command approval prompts'-complete -c wt -n "__fish_wt_using_subcommand dev; 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 dev; 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 dev; and __fish_seen_subcommand_from commit" -s h -l help -d 'Print help'-complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from squash" -s f -l force -d 'Skip command approval prompts'-complete -c wt -n "__fish_wt_using_subcommand dev; 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 dev; 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 dev; and __fish_seen_subcommand_from squash" -s h -l help -d 'Print help'-complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from push" -l allow-merge-commits -d 'Allow pushing merge commits (non-linear history)'-complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from push" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'-complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from push" -s h -l help -d 'Print help'-complete -c wt -n "__fish_wt_using_subcommand dev; 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 dev; and __fish_seen_subcommand_from rebase" -s h -l help -d 'Print help'-complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from ask-approvals" -s f -l force -d 'Skip command approval prompts'-complete -c wt -n "__fish_wt_using_subcommand dev; 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 dev; 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 dev; and __fish_seen_subcommand_from ask-approvals" -s h -l help -d 'Print help'-complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from select" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'-complete -c wt -n "__fish_wt_using_subcommand dev; and __fish_seen_subcommand_from 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 select" -s v -l verbose -d 'Enable verbose output (show git 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 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 select" -f -a "run-hook" -d 'Run a project hook for testing'+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 "commit" -d 'Commit changes with LLM-generated message'+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 "squash" -d 'Squash commits with LLM-generated message'+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 "push" -d 'Push changes to 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 "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 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 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 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)'+complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from push" -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 push" -s h -l help -d 'Print 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" -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'+complete -c wt -n "__fish_wt_using_subcommand beta; and __fish_seen_subcommand_from select" -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 select" -s h -l help -d 'Print help'complete -c wt -n "__fish_wt_using_subcommand list" -l format -d 'Output format' -r -f -a "table\t'Human-readable table format'json\t'Machine-readable JSON with display fields (includes styled unicode for rendering)'"complete -c wt -n "__fish_wt_using_subcommand list" -l branches -d 'Include branches without worktrees'diff --git a/tests/snapshots/integration__integration_tests__init__init_zsh.snap b/tests/snapshots/integration__integration_tests__init__init_zsh.snapindex 29368b2e3..e9bfe6682 100644--- a/tests/snapshots/integration__integration_tests__init__init_zsh.snap+++ b/tests/snapshots/integration__integration_tests__init__init_zsh.snap@@ -16,7 +16,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmptrPwrW/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpgJM1Ra/test-config.toml---success: trueexit_code: 0@@ -90,8 +90,8 @@ if command -v wt >/dev/null 2>&1 || [[ -n "${WORKTRUNK_BIN:-}" ]]; thenshift_wt_exec --internal "$subcommand" "$@";;- dev)- # Check if dev subcommand is select+ beta)+ # Check if beta subcommand is selectif [[ "$2" == "select" ]]; then_wt_exec --internal "$@"else@@ -232,21 +232,21 @@ _arguments "${_arguments_options[@]}" : \;;esac;;-(dev)+(beta)_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]' \-":: :_wt__dev_commands" \-"*::: :->dev" \+":: :_wt__beta_commands" \+"*::: :->beta" \&& ret=0case $state in- (dev)+ (beta)words=($line[1] "${words[@]}")(( CURRENT += 1 ))- curcontext="${curcontext%:*:*}:wt-dev-command-$line[1]:"+ curcontext="${curcontext%:*:*}:wt-beta-command-$line[1]:"case $line[1] in(run-hook)_arguments "${_arguments_options[@]}" : \@@ -408,7 +408,7 @@ _wt_commands() {local commands; commands=('init:Generate shell integration code' \'config:Manage configuration' \-'dev:Development and testing utilities' \+'beta:Development and testing utilities' \'list:List worktrees and optionally branches' \'switch:Switch to a worktree' \'remove:Finish current worktree, returning to primary if current' \@@ -418,6 +418,54 @@ _wt_commands() {)_describe -t commands 'wt commands' commands "$@"}+(( $+functions[_wt__beta_commands] )) ||+_wt__beta_commands() {+ local commands; commands=(+'run-hook:Run a project hook for testing' \+'commit:Commit changes with LLM-generated message' \+'squash:Squash commits with LLM-generated message' \+'push:Push changes to target branch' \+'rebase:Rebase current branch onto target branch' \+'ask-approvals:Approve commands in the project config (shows unapproved by default)' \+'select:Interactive worktree selector' \+ )+ _describe -t commands 'wt beta commands' commands "$@"+}+(( $+functions[_wt__beta__ask-approvals_commands] )) ||+_wt__beta__ask-approvals_commands() {+ local commands; commands=()+ _describe -t commands 'wt beta ask-approvals commands' commands "$@"+}+(( $+functions[_wt__beta__commit_commands] )) ||+_wt__beta__commit_commands() {+ local commands; commands=()+ _describe -t commands 'wt beta commit commands' commands "$@"+}+(( $+functions[_wt__beta__push_commands] )) ||+_wt__beta__push_commands() {+ local commands; commands=()+ _describe -t commands 'wt beta push commands' commands "$@"+}+(( $+functions[_wt__beta__rebase_commands] )) ||+_wt__beta__rebase_commands() {+ local commands; commands=()+ _describe -t commands 'wt beta rebase commands' commands "$@"+}+(( $+functions[_wt__beta__run-hook_commands] )) ||+_wt__beta__run-hook_commands() {+ local commands; commands=()+ _describe -t commands 'wt beta run-hook commands' commands "$@"+}+(( $+functions[_wt__beta__select_commands] )) ||+_wt__beta__select_commands() {+ local commands; commands=()+ _describe -t commands 'wt beta select commands' commands "$@"+}+(( $+functions[_wt__beta__squash_commands] )) ||+_wt__beta__squash_commands() {+ local commands; commands=()+ _describe -t commands 'wt beta squash commands' commands "$@"+}(( $+functions[_wt__complete_commands] )) ||_wt__complete_commands() {local commands; commands=()@@ -464,54 +512,6 @@ _wt__config__shell_commands() {local commands; commands=()_describe -t commands 'wt config shell commands' commands "$@"}-(( $+functions[_wt__dev_commands] )) ||-_wt__dev_commands() {- local commands; commands=(-'run-hook:Run a project hook for testing' \-'commit:Commit changes with LLM-generated message' \-'squash:Squash commits with LLM-generated message' \-'push:Push changes to target branch' \-'rebase:Rebase current branch onto target branch' \-'ask-approvals:Approve commands in the project config (shows unapproved by default)' \-'select:Interactive worktree selector' \- )- _describe -t commands 'wt dev commands' commands "$@"-}-(( $+functions[_wt__dev__ask-approvals_commands] )) ||-_wt__dev__ask-approvals_commands() {- local commands; commands=()- _describe -t commands 'wt dev ask-approvals commands' commands "$@"-}-(( $+functions[_wt__dev__commit_commands] )) ||-_wt__dev__commit_commands() {- local commands; commands=()- _describe -t commands 'wt dev commit commands' commands "$@"-}-(( $+functions[_wt__dev__push_commands] )) ||-_wt__dev__push_commands() {- local commands; commands=()- _describe -t commands 'wt dev push commands' commands "$@"-}-(( $+functions[_wt__dev__rebase_commands] )) ||-_wt__dev__rebase_commands() {- local commands; commands=()- _describe -t commands 'wt dev rebase commands' commands "$@"-}-(( $+functions[_wt__dev__run-hook_commands] )) ||-_wt__dev__run-hook_commands() {- local commands; commands=()- _describe -t commands 'wt dev run-hook commands' commands "$@"-}-(( $+functions[_wt__dev__select_commands] )) ||-_wt__dev__select_commands() {- local commands; commands=()- _describe -t commands 'wt dev select commands' commands "$@"-}-(( $+functions[_wt__dev__squash_commands] )) ||-_wt__dev__squash_commands() {- local commands; commands=()- _describe -t commands 'wt dev squash commands' commands "$@"-}(( $+functions[_wt__init_commands] )) ||_wt__init_commands() {local commands; commands=()