File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -122,12 +122,10 @@ z -b foo bar # replace foo with bar in cwd and cd there
122122
123123 Put something like this in your ` env.nu ` :
124124
125- lua /path/to/z.lua --init nushell | save -f ~/.cache/zlua.nu
125+ mkdir ($nu.data-dir | path join "vendor/autoload")
126+ lua /path/to/z.lua --init nushell | save -f ($nu.data-dir | path join "vendor/autoload/zlua.nu")
126127
127- Then put something like this in your ` config.nu ` :
128-
129- source ~/.cache/zlua.nu
130- alias z = _zlua
128+ Note: Only Nushell v0.96+ is supported
131129
132130- Power Shell:
133131
Original file line number Diff line number Diff line change @@ -2814,7 +2814,7 @@ end
28142814-- nushell
28152815---- -------------------------------------------------------------------
28162816local script_zlua_nushell = [[
2817- def _zlua --env --wrapped [...args: string] {
2817+ export def _zlua --env --wrapped [...args: string] {
28182818 if ($args | length) != 0 and $args.0 == "--add" {
28192819 with-env { _ZL_RANDOM: (random int) } { ^$env.ZLUA_LUAEXE $env.ZLUA_SCRIPT --add ...($args | skip 1) }
28202820 } else if ($args | length) != 0 and $args.0 == "--complete" {
@@ -2899,6 +2899,9 @@ if completer in $env.config.completions.external {
28992899 }
29002900 })
29012901}
2902+
2903+ export alias z = _zlua
2904+
29022905]]
29032906
29042907---- -------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments