Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Open
Description
Documentation
I had been using" ".join(shlex.escape(x) for x in args), not realizing thatshlex.join(args) is exactly that.
The docstring is just"""Return a shell-escaped string from *split_command*.""". I'd like to see something like
""" Return a shell-escaped string from *split_command*. That is, given a list of strings, return a string that, when printed, can be copy-pasted into a shell and provide an argc of len(split_command). For example: >>> print(shlex.join(['echo', 'foo\"bar\" baz'])) echo 'foo "bar" baz' >>> $ echo 'foo "bar" baz' foo "bar" baz $ """
Metadata
Metadata
Assignees
Projects
Status
Todo