Re: [Rd] MS Windows: R does not escape quotes in CLI options the same way as Rterm and Rscript

2021-12-22 Thread Tomas Kalibera

Now fixed in R-devel

Best
Tomas

On 12/16/21 10:22 AM, Tomas Kalibera wrote:


On 12/15/21 10:48 PM, Henrik Bengtsson wrote:

On MS Windows 10, the following works:


Rscript --vanilla -e "\"abc\""

[1] "abc"

and also:


Rterm --vanilla --no-echo -e "\"abc.txt\""

[1] "abc.txt"

whereas attempting the same with 'R' fails;


R --vanilla --no-echo -e "\"abc.txt\""

Error: object 'abc' not found
Execution halted

I get this with R 4.1.2 and R Under development (unstable) (2021-12-14
r81376 ucrt).

Is this a bug?


Yes, R.exe does not properly handle quotes (and backslashes preceding 
a quote, and trailing backslashes). This is the same as PR#18139 for 
shQuote(). I will put that on my list


Best
Tomas



/Henrik

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] MS Windows: R does not escape quotes in CLI options the same way as Rterm and Rscript

2021-12-16 Thread Tomas Kalibera



On 12/15/21 10:48 PM, Henrik Bengtsson wrote:

On MS Windows 10, the following works:


Rscript --vanilla -e "\"abc\""

[1] "abc"

and also:


Rterm --vanilla --no-echo -e "\"abc.txt\""

[1] "abc.txt"

whereas attempting the same with 'R' fails;


R --vanilla --no-echo -e "\"abc.txt\""

Error: object 'abc' not found
Execution halted

I get this with R 4.1.2 and R Under development (unstable) (2021-12-14
r81376 ucrt).

Is this a bug?


Yes, R.exe does not properly handle quotes (and backslashes preceding a 
quote, and trailing backslashes). This is the same as PR#18139 for 
shQuote(). I will put that on my list


Best
Tomas



/Henrik

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] MS Windows: R does not escape quotes in CLI options the same way as Rterm and Rscript

2021-12-15 Thread Henrik Bengtsson
On MS Windows 10, the following works:

> Rscript --vanilla -e "\"abc\""
[1] "abc"

and also:

> Rterm --vanilla --no-echo -e "\"abc.txt\""
[1] "abc.txt"

whereas attempting the same with 'R' fails;

> R --vanilla --no-echo -e "\"abc.txt\""
Error: object 'abc' not found
Execution halted

I get this with R 4.1.2 and R Under development (unstable) (2021-12-14
r81376 ucrt).

Is this a bug?

/Henrik

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel