Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
fix(nushell): use source in Home Manager module and export template defs (#1476)
worktrunk-bot6093b6124177
diff --git a/nix/home-manager-module.nix b/nix/home-manager-module.nixindex 024e7935b..9c5a25a23 100644--- a/nix/home-manager-module.nix+++ b/nix/home-manager-module.nix@@ -54,7 +54,7 @@ innushell = lib.mkIf cfg.enableNushellIntegration {extraConfig = ''- use ${+ source ${pkgs.runCommand "worktrunk-nushell-config.nu" { } ''${lib.getExe cfg.package} config shell init nu > $out''diff --git a/src/shell/snapshots/worktrunk__shell__tests__init_nu.snap b/src/shell/snapshots/worktrunk__shell__tests__init_nu.snapindex 53f175903..c8d8951f7 100644--- a/src/shell/snapshots/worktrunk__shell__tests__init_nu.snap+++ b/src/shell/snapshots/worktrunk__shell__tests__init_nu.snap@@ -8,7 +8,7 @@ expression: output# Note: nushell's completion engine bypasses custom completers when the current# token starts with `-`, so flag completions (e.g. `wt switch --<TAB>`) don't# appear. Subcommand and value completions work. (nushell/nushell#14504)-def "nu-complete wt" [context: string] {+export def "nu-complete wt" [context: string] {let worktrunk_bin = if ($env.WORKTRUNK_BIN? | is-not-empty) {$env.WORKTRUNK_BIN} else {@@ -69,7 +69,7 @@ def "nu-complete wt" [context: string] {# Stderr flows to the terminal in real-time. The binary sees non-TTY stdout# and uses buffered mode, but commands other than `list` don't benefit from# progressive rendering anyway.-def --env --wrapped wt [...args: string@"nu-complete wt"] {+export def --env --wrapped wt [...args: string@"nu-complete wt"] {let worktrunk_bin = if ($env.WORKTRUNK_BIN? | is-not-empty) {$env.WORKTRUNK_BIN} else {diff --git a/templates/nushell.nu b/templates/nushell.nuindex 00921863a..2e023f353 100644--- a/templates/nushell.nu+++ b/templates/nushell.nu@@ -4,7 +4,7 @@# Note: nushell's completion engine bypasses custom completers when the current# token starts with `-`, so flag completions (e.g. `wt switch --<TAB>`) don't# appear. Subcommand and value completions work. (nushell/nushell#14504)-def "nu-complete {{ cmd }}" [context: string] {+export def "nu-complete {{ cmd }}" [context: string] {let worktrunk_bin = if ($env.WORKTRUNK_BIN? | is-not-empty) {$env.WORKTRUNK_BIN} else {@@ -65,7 +65,7 @@ def "nu-complete {{ cmd }}" [context: string] {# Stderr flows to the terminal in real-time. The binary sees non-TTY stdout# and uses buffered mode, but commands other than `list` don't benefit from# progressive rendering anyway.-def --env --wrapped {{ cmd }} [...args: string@"nu-complete {{ cmd }}"] {+export def --env --wrapped {{ cmd }} [...args: string@"nu-complete {{ cmd }}"] {let worktrunk_bin = if ($env.WORKTRUNK_BIN? | is-not-empty) {$env.WORKTRUNK_BIN} else {