Skip to content

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

feat: Temporarily disable tier 2 shells for `wt config shell`

Maximilian Roosa15fdd8e0fea
diff --git a/README.md b/README.md
index 2c4acad0e..b12aa6ecb 100644
--- a/README.md
+++ b/README.md
@@ -484,7 +484,7 @@ Worktrunk can automatically configure your shell:
wt config shell
```
-This adds shell integration to your config files (supports Bash, Zsh, Fish, Nushell, PowerShell, Elvish, Xonsh, Oil). The integration enables `wt switch` to change directories and `wt remove` to return to the previous location.
+This adds shell integration to your config files (supports Bash, Zsh, and Fish). The integration enables `wt switch` to change directories and `wt remove` to return to the previous location.
For manual setup instructions, see `wt config shell --help`.
diff --git a/src/shell.rs b/src/shell.rs
index 5926f35bf..dc441bd28 100644
--- a/src/shell.rs
+++ b/src/shell.rs
@@ -2,15 +2,29 @@ use askama::Template;
use std::path::PathBuf;
/// Supported shells
+///
+/// Tier 1 shells (bash, fish, zsh) are fully supported and tested.
+/// Tier 2 shells (elvish, nushell, oil, powershell, xonsh) are works in progress.
+/// TODO: Get tier-2 shells working - currently have test failures and compatibility issues
#[derive(Debug, Clone, Copy, clap::ValueEnum, strum::Display, strum::EnumString)]
#[strum(serialize_all = "lowercase", ascii_case_insensitive)]
pub enum Shell {
Bash,
+ /// TODO: Elvish support - currently disabled due to test failures
+ #[value(skip)]
Elvish,
Fish,
+ /// TODO: Nushell support - currently disabled due to test failures
+ #[value(skip)]
Nushell,
+ /// TODO: Oil support - currently disabled due to test failures
+ #[value(skip)]
Oil,
+ /// TODO: PowerShell support - currently disabled due to test failures
+ #[value(skip)]
Powershell,
+ /// TODO: Xonsh support - currently disabled due to test failures
+ #[value(skip)]
Xonsh,
Zsh,
}
diff --git a/tests/integration_tests/completion.rs b/tests/integration_tests/completion.rs
index 70f639866..a5b76214b 100644
--- a/tests/integration_tests/completion.rs
+++ b/tests/integration_tests/completion.rs
@@ -781,15 +781,16 @@ fn test_complete_init_shows_shells() {
let stdout = String::from_utf8_lossy(&output.stdout);
let shells = value_suggestions(&stdout);
- // Should show all shell types
+ // Should show tier 1 shell types (bash, fish, zsh)
+ // Tier 2 shells (elvish, nushell, oil, powershell, xonsh) are hidden until fully working
assert!(shells.contains(&"bash"));
assert!(shells.contains(&"fish"));
assert!(shells.contains(&"zsh"));
- assert!(shells.contains(&"elvish"));
- assert!(shells.contains(&"nushell"));
- assert!(shells.contains(&"oil"));
- assert!(shells.contains(&"powershell"));
- assert!(shells.contains(&"xonsh"));
+ assert!(!shells.contains(&"elvish"));
+ assert!(!shells.contains(&"nushell"));
+ assert!(!shells.contains(&"oil"));
+ assert!(!shells.contains(&"powershell"));
+ assert!(!shells.contains(&"xonsh"));
}
#[test]
@@ -825,10 +826,12 @@ fn test_complete_init_with_source_flag() {
let stdout = String::from_utf8_lossy(&output.stdout);
let shells = value_suggestions(&stdout);
- // Should show all shell types, same as without --source
+ // Should show tier 1 shell types, same as without --source
assert!(shells.contains(&"bash"));
assert!(shells.contains(&"fish"));
assert!(shells.contains(&"zsh"));
+ assert!(!shells.contains(&"elvish"));
+ assert!(!shells.contains(&"nushell"));
}
#[test]
@@ -867,10 +870,12 @@ fn test_complete_config_shell_flag_with_source() {
let stdout = String::from_utf8_lossy(&output.stdout);
let shells = value_suggestions(&stdout);
- // Should show all shell types, same as without --source
+ // Should show tier 1 shell types, same as without --source
assert!(shells.contains(&"bash"));
assert!(shells.contains(&"fish"));
assert!(shells.contains(&"zsh"));
+ assert!(!shells.contains(&"elvish"));
+ assert!(!shells.contains(&"nushell"));
}
#[test]
diff --git a/tests/integration_tests/e2e_shell.rs b/tests/integration_tests/e2e_shell.rs
index 5f59b8888..a8d9fee46 100644
--- a/tests/integration_tests/e2e_shell.rs
+++ b/tests/integration_tests/e2e_shell.rs
@@ -9,8 +9,9 @@ use rstest::rstest;
#[case("bash")]
#[case("fish")]
#[case("zsh")]
-// Oil remains optional until tier-2 feature flag is enabled
-#[cfg_attr(feature = "tier-2-integration-tests", case("oil"))]
+// TODO: Tier 2 shells (elvish, nushell, oil, powershell, xonsh) - would like to get these working
+// Currently disabled due to test failures and platform compatibility issues
+// #[cfg_attr(feature = "tier-2-integration-tests", case("oil"))]
fn test_e2e_switch_and_remove_roundtrip(#[case] shell: &str) {
let mut repo = TestRepo::new();
repo.commit("Initial commit");
diff --git a/tests/integration_tests/e2e_shell_post_start.rs b/tests/integration_tests/e2e_shell_post_start.rs
index ae96c83b6..8e8049b31 100644
--- a/tests/integration_tests/e2e_shell_post_start.rs
+++ b/tests/integration_tests/e2e_shell_post_start.rs
@@ -13,11 +13,11 @@ use std::time::Duration;
// zsh removed - too similar to bash
#[case("bash")]
#[case("fish")]
-// Tier 2: Shells requiring extra setup
-// TODO: Fix non-core shells - same issues as e2e_shell.rs
+// TODO: Tier 2 shells (elvish, nushell, oil, powershell, xonsh) - would like to get these working
+// Currently disabled due to test failures and platform compatibility issues
// #[cfg_attr(feature = "tier-2-integration-tests", case("elvish"))]
// #[cfg_attr(feature = "tier-2-integration-tests", case("nushell"))]
-#[cfg_attr(feature = "tier-2-integration-tests", case("oil"))]
+// #[cfg_attr(feature = "tier-2-integration-tests", case("oil"))]
// #[cfg_attr(feature = "tier-2-integration-tests", case("xonsh"))]
fn test_e2e_post_start_background_command(#[case] shell: &str) {
let repo = TestRepo::new();
diff --git a/tests/integration_tests/init.rs b/tests/integration_tests/init.rs
index b822118bc..7f54e3815 100644
--- a/tests/integration_tests/init.rs
+++ b/tests/integration_tests/init.rs
@@ -60,7 +60,7 @@ fn test_init_invalid_shell() {
----- stderr -----
error: invalid value 'invalid-shell' for '<SHELL>'
- [possible values: bash, elvish, fish, nushell, oil, powershell, xonsh, zsh]
+ [possible values: bash, fish, zsh]
For more information, try '--help'.
");
diff --git a/tests/snapshots/integration__integration_tests__init__init_bash.snap b/tests/snapshots/integration__integration_tests__init__init_bash.snap
index 7fa6d133c..c231da887 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: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpwOlI4n/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmppHjR06/test-config.toml
---
success: true
exit_code: 0
@@ -480,7 +480,7 @@ _wt() {
fi
case "${prev}" in
--shell)
- COMPREPLY=($(compgen -W "bash elvish fish nushell oil powershell xonsh zsh" -- "${cur}"))
+ COMPREPLY=($(compgen -W "bash fish zsh" -- "${cur}"))
return 0
;;
--command-name)
@@ -499,7 +499,7 @@ _wt() {
return 0
;;
wt__init)
- opts="-C -v -h --command-name --verbose --help bash elvish fish nushell oil powershell xonsh zsh"
+ opts="-C -v -h --command-name --verbose --help bash fish zsh"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
diff --git a/tests/snapshots/integration__integration_tests__init__init_fish.snap b/tests/snapshots/integration__integration_tests__init__init_fish.snap
index 54dea9e81..f5605f063 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: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpsRi5vV/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp0zq2ID/test-config.toml
---
success: true
exit_code: 0
@@ -215,12 +215,7 @@ complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand
complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from refresh-cache" -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 refresh-cache" -s h -l help -d 'Print help'
complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from shell" -l shell -d 'Specific shell to configure (default: all shells with existing config files)' -r -f -a "bash\t''
-elvish\t''
fish\t''
-nushell\t''
-oil\t''
-powershell\t''
-xonsh\t''
zsh\t''"
complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from shell" -l command-name -d 'Command name to use (defaults to \'wt\')' -r
complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from shell" -s C -d 'Run as if worktrunk was started in <path> instead of the current working directory' -r -F
diff --git a/tests/snapshots/integration__integration_tests__init__init_zsh.snap b/tests/snapshots/integration__integration_tests__init__init_zsh.snap
index a889208d0..ab47bb6bc 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: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpdfMHP8/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp5Os0LO/test-config.toml
---
success: true
exit_code: 0
@@ -182,7 +182,7 @@ _arguments "${_arguments_options[@]}" : \
'--verbose[Enable verbose output (show git commands and debug info)]' \
'-h[Print help]' \
'--help[Print help]' \
-':shell -- Shell to generate code for:(bash elvish fish nushell oil powershell xonsh zsh)' \
+':shell -- Shell to generate code for:(bash fish zsh)' \
&& ret=0
;;
(config)
@@ -231,7 +231,7 @@ _arguments "${_arguments_options[@]}" : \
;;
(shell)
_arguments "${_arguments_options[@]}" : \
-'--shell=[Specific shell to configure (default\: all shells with existing config files)]:SHELL:(bash elvish fish nushell oil powershell xonsh zsh)' \
+'--shell=[Specific shell to configure (default\: all shells with existing config files)]:SHELL:(bash fish zsh)' \
'--command-name=[Command name to use (defaults to '\''wt'\'')]:COMMAND_NAME:_default' \
'-C+[Run as if worktrunk was started in <path> instead of the current working directory]:path:_files' \
'-f[Skip confirmation prompt]' \