From a8daa89500f2aee6d73b6915928f9f65f0a8dff3 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Tue, 25 Jun 2019 14:21:58 +0200 Subject: Add Filename.quote_command function (#1492) MPR#7672: add a Filename.quote_command function This function takes care of quoting the command and its arguments so that they are correctly parsed by the system shell (/bin/sh for Unix, cmd.exe for Win32). Redirections for std input (< file) and std output (> file) and std error (2> file) can also be specified as optional arguments. A 2>&1 redirection is used if stdout and stderr are redirected to the same file. The result is a string that can be passed directly to Sys.command or to the Unix functions that expect shell command lines. --- Changes | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Changes') diff --git a/Changes b/Changes index bc485a5daa..c3686b9272 100644 --- a/Changes +++ b/Changes @@ -63,6 +63,10 @@ Working version (Jacques-Henri Jourdan, review by Stephen Dolan, Gabriel Scherer and Damien Doligez) +- #7672, #1492: Add `Filename.quote_command` to produce properly-quoted + commands for execution by Sys.command. + (Xavier Leroy, review by David Allsopp and Damien Doligez) + ### Other libraries: - #1939, #2023: Implement Unix.truncate and Unix.ftruncate on Windows. -- cgit v1.2.1