This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Anthony Sottile
Recipients Anthony Sottile, timonegk
Date 2019-10-26.05:02:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1572066179.47.0.249930921545.issue38570@roundup.psfhosted.org>
In-reply-to
Content
Try with `sh`:

(it prompts for continuation, I pressed ^D to end it)

$ export F=$'\''
> 
> 
> 
> 
> sh: 8: Syntax error: Unterminated quoted string


dollar-sign strings are a `bash` extension, I don't think they're supported by *sh*lex (maybe if there was a bashlex module :D)

There's the `posix=False` option to `shlex.split` -- I'm not sure what it does/doesn't enable though (the docs aren't thorough here and the code is a bit non-obvious):

>>> shlex.split(s, posix=False)
['export', "F=$'\\''"]
History
Date User Action Args
2019-10-26 05:02:59Anthony Sottilesetrecipients: + Anthony Sottile, timonegk
2019-10-26 05:02:59Anthony Sottilesetmessageid: <1572066179.47.0.249930921545.issue38570@roundup.psfhosted.org>
2019-10-26 05:02:59Anthony Sottilelinkissue38570 messages
2019-10-26 05:02:59Anthony Sottilecreate