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.

template: fix variable not found error

+9 -10
+9 -10
template.nu
··· 48 48 get-functions 49 49 | if $all {$in} else {$in | where $it not-starts-with "_"} 50 50 | each {|function| 51 - let usage = if $print_usage { 52 - let help = help $module_name $function | lines 53 - {( 54 - $help 55 - | get ( 56 - ($help | enumerate | where item == $"(ansi green)Usage(ansi reset):").0.index + 1 57 - ) 58 - | str trim 59 - )} 60 - } else {{}} 51 + let help = help $module_name $function | lines 52 + 53 + let usage = if $print_usage {{( 54 + $help 55 + | get ( 56 + ($help | enumerate | where item == $"(ansi green)Usage(ansi reset):").0.index + 1 57 + ) 58 + | str trim 59 + )}} else {{}} 61 60 62 61 let short_description = $help 63 62 | first