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

template: fix function validation

matrixfurry.com 4e03edd2 85edb760

verified
+2 -1
+2 -1
template.nu
··· 25 25 print-functions 26 26 } else { 27 27 let cmd_str = $cmd | str join ' ' 28 - let function = get-functions | where $it starts-with $cmd_str | first 28 + let function = get-functions | where ($cmd_str starts-with $it) | first 29 29 30 30 if ($function | is-empty) { 31 31 log error $"Unknown command: `($cmd_str)`" 32 32 print-functions 33 + exit 1 33 34 } 34 35 35 36 exec nu -c $"use ($module_path); ($module_name) ($cmd_str)"