GNOME Bugzilla – Bug 134272
quote (or escape) dragged files with spaces, etc
Last modified: 2004-12-22 21:47:04 UTC
Currently, if I DnD a file from Nautilus and the filename/path has spaces or other shell-unsafe characters, the unsafe characters are left intact. Instead, either the entire string should be enclosed with single quotes, or the unsafe characters should be escaped. I think using single quotes would be better because that would be slightly more useful when you are running a program in the terminal (eg: an editor) rather than just a shell, but I don't know if non-bash shells handle single quotes in the same was as bash. FWIW, Windows surrounds the string with double quotes and MacOS X escapes unsafe characters with a backslash. Haven't tested with 2.5, so I don't know if it is still an issue.
There is no way to know what escaping/quoting method the app the user is running in a terminal is going to need. I think the best here is to let the user handle the issue.
After doing a little research, I think surrounding the string in single-quotes would work for both bourne- and csh-like shells. Would that be a reasonable way to implement it? Better than nothing perhaps...
*** Bug 141965 has been marked as a duplicate of this bug. ***
It becomes annoying, though, if what you are doing is pasting a filename into an html file you are editing in vi, for example...