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

Configure Feed

Select the types of activity you want to include in your feed.

fix capture of mutable variable

+2 -2
+2 -2
mod.nu
··· 3 3 4 4 const template: path = path self ./template.nu 5 5 6 + let nu_lib_dir = $NU_LIB_DIRS | first 7 + 6 8 export def install [ 7 9 src: path # Module source path 8 10 prefix?: path = ~/.local # installation prefix ··· 34 36 cp -r $src $installed_mod_path 35 37 36 38 if $install_module { 37 - let nu_lib_dir = $NU_LIB_DIRS | first 38 39 if $force {rm -f ($nu_lib_dir | path join $mod_name)} 39 40 ln -s $installed_mod_path $nu_lib_dir 40 41 } ··· 66 67 rm -f $installed_bin_path 67 68 68 69 if $remove_module { 69 - let nu_lib_dir = $NU_LIB_DIRS | first 70 70 rm -f ($nu_lib_dir | path join $mod_name) 71 71 } 72 72 }