diff --git a/numd/commands.nu b/numd/commands.nu index 472e858..e1fdd44 100644 --- a/numd/commands.nu +++ b/numd/commands.nu @@ -477,15 +477,17 @@ export def execute-intermediate-script [ ]: nothing -> string { let args = if $use_host_config { [ - ...(if ($nu.env-path | path exists) { [--env-config $nu.env-path] } else { [] }) - ...(if ($nu.config-path | path exists) { [--config $nu.config-path] } else { [] }) - ...(if ($nu.plugin-path | path exists) { [--plugin-config $nu.plugin-path] } else { [] }) + [--env-config $nu.env-path] + [--config $nu.config-path] + [--plugin-config $nu.plugin-path] ] + | where {|i| $i.1 | path exists } + | flatten } else { [-n] } - (^$nu.current-exe ...$args $intermed_script_path) + ^$nu.current-exe ...$args $intermed_script_path | if $print_block_results { tee { print } } else { } | complete | if $in.exit_code == 0 { diff --git a/z_examples/2_numd_commands_explanations/numd_commands_explanations.md b/z_examples/2_numd_commands_explanations/numd_commands_explanations.md index 1d7bdaa..e5ba54c 100644 --- a/z_examples/2_numd_commands_explanations/numd_commands_explanations.md +++ b/z_examples/2_numd_commands_explanations/numd_commands_explanations.md @@ -221,8 +221,8 @@ compute-change-stats $file $md_orig $md_res # => │ filename │ simple_markdown.md │ # => │ nushell_blocks │ 3 │ # => │ levenshtein_dist │ 248 │ -# => │ diff_lines │ --12 (-33.3%) │ -# => │ diff_words │ --24 (-30.8%) │ -# => │ diff_chars │ --163 (-32.5%) │ +# => │ diff_lines │ -12 (-33.3%) │ +# => │ diff_words │ -24 (-30.8%) │ +# => │ diff_chars │ -163 (-32.5%) │ # => ╰──────────────────┴────────────────────╯ ```