diff --git a/crates/nu-command/src/system/run_external.rs b/crates/nu-command/src/system/run_external.rs index b38650894c..787c21bb7b 100644 --- a/crates/nu-command/src/system/run_external.rs +++ b/crates/nu-command/src/system/run_external.rs @@ -69,7 +69,7 @@ impl Command for External { }; // Find the absolute path to the executable. On Windows, set the - // executable to "cmd.exe" if it's is a CMD internal command. If the + // executable to "cmd.exe" if it's a CMD internal command. If the // command is not found, display a helpful error message. let executable = if cfg!(windows) && is_cmd_internal_command(&name_str) { PathBuf::from("cmd.exe") @@ -114,7 +114,7 @@ impl Command for External { command.args(args.into_iter().map(|s| s.item)); // Configure stdout and stderr. If both are set to `OutDest::Pipe`, - // we'll setup a pipe that merge two streams into one. + // we'll setup a pipe that merges two streams into one. let stdout = stack.stdout(); let stderr = stack.stderr(); let merged_stream = if matches!(stdout, OutDest::Pipe) && matches!(stderr, OutDest::Pipe) { @@ -534,7 +534,7 @@ fn escape_cmd_argument(arg: &Spanned) -> Result, ShellE let Spanned { item: arg, span } = arg; let bytes = arg.as_encoded_bytes(); if bytes.iter().any(|b| matches!(b, b'\r' | b'\n' | b'%')) { - // \r and \n trunacte the rest of the arguments and % can expand environment variables + // \r and \n truncate the rest of the arguments and % can expand environment variables Err(ShellError::ExternalCommand { label: "Arguments to CMD internal commands cannot contain new lines or percent signs '%'"