Skip to content

Improve file drag and drop support #110

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

Open
IceFreez3r opened this issue Feb 24, 2025 · 2 comments
Open

Improve file drag and drop support #110

IceFreez3r opened this issue Feb 24, 2025 · 2 comments
Labels

Comments

@IceFreez3r
Copy link

Dragging a file from the explorer into the terminal enters its path. Since the path could contain special characters, it is escaped with double quotes " on Windows or single quotes ' on Ubuntu 24. The problem is that trogon escapes the input an additional time. So the executed command looks something like this:

script.py --output '"D:\path\to\file.txt"'

The parsed path therefore still contains the quotes leading to a FileNotFoundError.
I'd suggest, that trogon should detect when the input is already escaped and not escape it an additional time.

@daneah
Copy link
Collaborator

daneah commented Mar 6, 2025

Thanks for the report @IceFreez3r—this does not appear to be the case in macOS, so seems Windows and Linux specific. I unfortunately don't have access to either type of system at the moment so not sure if I'll be able to effectively test this myself, but happy to accept PRs to this effect!

@IceFreez3r
Copy link
Author

On macOS it just inserts the path without escaping it? What if the path contains special characters?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants