GNOME Bugzilla – Bug 537112
improve paste of uris from clipboard
Last modified: 2021-06-10 19:40:15 UTC
On paste-from-clipboard (ctrl-shift-V), we should not just always paste as text, but instead look if the text/uri-list target is present, and if so, paste as quoted fuse paths, just like we do when dnd'ing text/uri-list to the terminal.
Not very useful without bug 314120 making nautilus offer text/uri-list on the clipboard.
Fixed in trunk.
Umm. Not sure about the fuse path.. What if I want to paste the URI to wget it?
Hmm. If it translates into a fuse path, you can just gvfs-copy it. OTOH, maybe we should make this an extra action, have "Paste as text" and "Paste as paths" ?
Humm, that would require a bunch of new API, right? Not sure what the best practice here is.
No new API needed, no. It's just a regular menu entry, all the paste logic is already there in g-t.
Ah ok then. So how does ctrl+shift+insert work then? /me likes that to keep pasting URLs.
C-S-[KP_]Insert is handled directly inside vte, doing paste-as-text. I guess adding a separate accel-less PasteAsPaths action, shown only if text/uri-list is present on the clipboard, would be the best here?
Something like that, yeah. Though, not sure how discoverable/intuitive that would be. The whole fuse gio stuff is a hack that is supposed to be hidden from users. But then again, terminal users are not normal users.
Fixed in svn.
I have a problem here. If I copy a file from nautilus into the terminal, I get a file:///foo/bar url - there is almost no terminal application that accepts URIs (think cat, ls, ...). So the solution to paste URIs by default is wrong for file URIs. However, for http or ftp URIs I'd want the real URI instead of some gvfs nonsense - again, because almost no terminal app takes gvfs paths, but wants real URIs. So my solution would be to use the filename for the file:// URI scheme and use the full URI for all other schemes. Does that make sense?
*** Bug 562002 has been marked as a duplicate of this bug. ***
(In reply to comment #11) > However, for http or ftp URIs I'd want the real URI instead of some gvfs > nonsense - again, because almost no terminal app takes gvfs paths, but wants > real URIs. > I should clarify this: no terminal app takes gvs paths => no terminal app I use for working with http or ftp URIs (like wget, lftp etc) It might make sense to have a "paste as gvfs path" for treating ftp and http URIs as files though, no idea.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-terminal/-/issues/6594.