Skip Menu |

This queue is for tickets about the String-ShellQuote CPAN distribution.

Report information
The Basics
Id: 75315
Status: open
Priority: 0/
Queue: String-ShellQuote

People
Owner: Nobody in particular
Requestors: JDCampbell [...] nau.edu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: String::ShellQuote case not handled right
Date: Sun, 26 Feb 2012 18:17:49 +0800
To: bug-String-ShellQuote [...] rt.cpan.org
From: John David Campbell <JDCampbell [...] nau.edu>
Here's an example of a filename and it's quoted version that I don't think are handled correctly: ** /home/jdc/Dropbox/English Faculty/monkhtsetseg/student's book (English -3).docx '/home/jdc/Dropbox/English Faculty/monkhtsetseg/student'\''s book (English -3).docx From print "$file\n"; print shell_quote($file),"\n"; I hate apostrophes...even more than spaces in file names. John
On Sun Feb 26 05:17:59 2012, JDCampbell@nau.edu wrote: Show quoted text
> Here's an example of a filename and it's quoted version that I don't think > are handled correctly: > > ** /home/jdc/Dropbox/English Faculty/monkhtsetseg/student's book (English-3).docx > '/home/jdc/Dropbox/English Faculty/monkhtsetseg/student'\''s book (English-3).docx'
The shell_quote output appears correct to me (assuming you just mis-pasted the final single quote, which my String::ShellQuote (1.04) includes). It's two single quoted strings with an escaped single quote in the middle. bash-style shell quoting will mush them all together: tom@whaam ~ $ perl -E 'say "<$_>" for @ARGV' '/home/jdc/Dropbox/English Faculty/monkhtsetseg/student'\''s book (English-3).docx' </home/jdc/Dropbox/English Faculty/monkhtsetseg/student's book (English-3).docx> It's similar to this quoting trick which doesn't use the backslash-singlequote, but switches to double quotes instead: tom@whaam ~ $ echo 'bash'"'"'s quoting is weird' bash's quoting is weird