Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix path escaping on windows #66

Open
bwhmather opened this issue Mar 28, 2022 · 1 comment
Open

Fix path escaping on windows #66

bwhmather opened this issue Mar 28, 2022 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@bwhmather
Copy link
Owner

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))

@bwhmather
Copy link
Owner Author

See #64

@bwhmather bwhmather added bug Something isn't working good first issue Good for newcomers labels Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant