mirror of
https://github.com/max-sixty/worktrunk.git
synced 2026-09-14 20:00:38 +08:00
fix(nushell): use source in Home Manager module and export template defs (#1476)
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user