Skip to content

Fix path escaping on windows #66

@bwhmather

Description

@bwhmather

Escaping of paths for printing to the console is currently disabled on windows. At some point, we will need to untangle the byzantine rules for preparing strings to paste into the console and get this implemented.

The problem function:

def escape_path(path):
"""
Takes a `pathlib.Path` object and returns a string representation that can
be safely copied into the system shell.
"""
if sys.platform == "win32":
# TODO
return str(path)
else:
return shlex.quote(str(path))

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions