Easily turn Nushell modules into cross-shell CLI tools
library nu nushell

Fix capture of mutable variable

matrixfurry.com 2c6ecec6 f8e3d05c

verified
+2 -2
+2 -2
mod.nu
··· 34 34 cp -r $src $installed_mod_path 35 35 36 36 if $install_module { 37 - let nu_lib_dir = $NU_LIB_DIRS | first 37 + let nu_lib_dir = $env.NU_LIB_DIRS | first 38 38 if $force {rm -f ($nu_lib_dir | path join $mod_name)} 39 39 ln -s $installed_mod_path $nu_lib_dir 40 40 } ··· 66 66 rm -f $installed_bin_path 67 67 68 68 if $remove_module { 69 - let nu_lib_dir = $NU_LIB_DIRS | first 69 + let nu_lib_dir = $env.NU_LIB_DIRS | first 70 70 rm -f ($nu_lib_dir | path join $mod_name) 71 71 } 72 72 }