It would be nice if shell_quote also worked with iterables

Issue #33 invalid
Former user created an issue

As a workaround i can do " ".join([sarge.shell_quote(s) for s in ["cat", "/dir/with spaces/file"]]) but sarge.shell_quote(["cat", "/dir/with spaces/file"]) would be a lot nicer.

Comments (1)

  1. Vinay Sajip repo owner

    One doesn't necessarily need to quote everything. What you want could be catered for using e.g. shell_format('cat {0}', '/dir/with spaces/file') which would result in "cat 'dir with spaces'".

  2. Log in to comment