fix(nushell): use source in Home Manager module and export template defs (#1476)

This commit is contained in:
worktrunk-bot
2026-03-12 23:25:39 -07:00
committed by GitHub
parent 4e487a7fbf
commit 6093b61241
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ in
nushell = lib.mkIf cfg.enableNushellIntegration {
extraConfig = ''
use ${
source ${
pkgs.runCommand "worktrunk-nushell-config.nu" { } ''
${lib.getExe cfg.package} config shell init nu > $out
''
@@ -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 {
+2 -2
View File
@@ -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 {