Open tcannonfodder opened 8 months ago
Sounds reasonable. Wouldn't know where to put this command though; maybe we can just add it to the Command Palette? You can try an implementation for GitHub as the current command is
{
"caption": "github: open file on remote",
"command": "gs_github_open_file_on_remote",
"args": { "preselect": true }
},
we add maybe
{
"caption": "github: copy url to file to clipboard", // better description?
"command": "gs_github_copy_file_url",
"args": { "preselect": true }
},
(The original command is a bit a misnomer as it should be "open file in the browser" or something like that.) Obviously both commands share the same code so there is some refactoring necessary that extracts these bits so it can be shared between both commands. 🤷♀️
It would be great to be able to copy the URL that "open file on remote" generates, rather than opening a full browser window. That would make it easier to collaborate with team members/stash the URL somewhere else when doing a code review.