From 7413ef28243d7586037b8b0b9133e6e7c7d44255 Mon Sep 17 00:00:00 2001 From: Reilly Wood <26268125+rgwood@users.noreply.github.com> Date: Sat, 22 Apr 2023 10:57:16 -0700 Subject: [PATCH] Tweak run-external signature so command must be a string (#8971) Tiny fix: clarify in `run-external`'s signature that the external command must be a string. ### Before ``` Signatures: | run-external -> Parameters: command : external command to run ...args : arguments for external command ``` ### After ``` Signatures: | run-external -> Parameters: command : external command to run ...args : arguments for external command ``` ### Notes I was hoping to change more `any`s to more specific types, but alas I think we can only change `command` right now. The input can be any type and it gets rendered to a string before being passed to the external. The args can be any value type and they get converted to strings. The output can be either binary or a string. --- crates/nu-command/src/system/run_external.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/nu-command/src/system/run_external.rs b/crates/nu-command/src/system/run_external.rs index 1de0513884..59f295642b 100644 --- a/crates/nu-command/src/system/run_external.rs +++ b/crates/nu-command/src/system/run_external.rs @@ -42,7 +42,7 @@ impl Command for External { .switch("redirect-stdout", "redirect stdout to the pipeline", None) .switch("redirect-stderr", "redirect stderr to the pipeline", None) .switch("trim-end-newline", "trimming end newlines", None) - .required("command", SyntaxShape::Any, "external command to run") + .required("command", SyntaxShape::String, "external command to run") .rest("args", SyntaxShape::Any, "arguments for external command") .category(Category::System) }