Write a Python function called escape shell args(args, sep=' ', style=None) that takes a list of string…
Write a Python function called escape shell args(args, sep=' ', style=None) that takes a list of string…: a task in repo2rlenv-r2e (Harbor dataset). The function must support two escaping styles: - 'sh' : POSIX shell style (for Linux/BSD/macOS). Arguments containing characters that require quoting…
The task
The function must support two escaping styles: - `'sh'`: POSIX shell style (for Linux/BSD/macOS). Arguments containing characters that require quoting are wrapped in single quotes. Embedded single quotes inside an argument are handled by ending the single-quoted string, inserting an escaped single quote, and resuming…
Part of FineEnvs/repo2rlenv-r2e.