diff -r 308f3c1e36d3 Lib/shlex.py --- a/Lib/shlex.py Wed Jul 16 23:58:12 2014 +0300 +++ b/Lib/shlex.py Thu Jul 17 17:34:06 2014 +0100 @@ -230,7 +230,7 @@ if self.debug >= 2: print "shlex: I see punctuation in word state" self.state = ' ' - if self.token: + if self.token or (self.posix and quoted): break # emit current token else: continue