Add a space after dropped file/path #5980
Replies: 2 comments 4 replies
-
Doing this in all contexts is not necessarily a good idea since you could also drag and drop into say, a text editor window. I think this falls more into shell integration territory since it only makes sense for shells where arguments are delimited by spaces. |
Beta Was this translation helpful? Give feedback.
-
I will say I kind of don't like the behavior of dragging and dropping files because right now I think we always add shell escapes, but as @pluiedev said (and I've considered before), you can drop these anywhere so escaping unconditionally is annoying and prefers the shell. I've considered -- but didn't follow through -- only shell escaping if we have shell integration and we know we're at a prompt. Otherwise, just letting it through. But that isn't perfect either. For your specific request, I don't think any other terminal adds a space after a drag and drop, and I tried my best in this case to follow other terminals (since, as I said, the behavior is a bit annoying anyways). |
Beta Was this translation helpful? Give feedback.
-
When you drag a folder or file its path is copied, but without adding a space. This forces the addition of the space by hand in case you want to compose a command (e.g.
cp
). MacOS Terminal adds a space each time the path is entered. It would be very convenient to have this behavior in Ghostty as well.Beta Was this translation helpful? Give feedback.
All reactions