You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Copy GitHub __ Link actions from file/share menu copy links with file paths and line ranges #4598
Open a GitHub repo with the stable version of GHPRI installed
Open the File > Share menu
Copy GitHub Permalink, Copy GitHub HEAD Link, or Copy GitHub Permalink as Markdown
🐛 the active file path and line are included
We special-cased the file menu's behavior for copying vscode.dev links in the builtin GitHub extension and the Remote Repositories extensions to not copy the file path or line, so GHPRI's contributions to file/share are inconsistent (this is not a regression from the changes just checked into main). However Raymond Zhao (@rzhao271) and Aaron Munger (@amunger) had feedback that the file/share behavior was not what they expected, I think they expected it to relate to the active editor, in which case we would keep GHPRI's current behavior and change the vscode.dev link behavior.
Whatever we do here we should be consistent across all the copy link commands so I'm opening this issue to discuss the desired behavior.
I think we should not include the file and line number for now. However there was a good suggestion to consolidate the share submenus as a single contribution point in microsoft/vscode#176316, and if we did this then we'd be able to remove a lot of the duplicated commands in favor of a single command which behaves differently depending on the passed arguments.
Activity
alexr00 commentedon Mar 14, 2023
Joyce Er (@joyceerhl) have you come to any conclusions on whether to include the file + line number when using commands from the File > Share menu?
joyceerhl commentedon Mar 14, 2023
I think we should not include the file and line number for now. However there was a good suggestion to consolidate the share submenus as a single contribution point in microsoft/vscode#176316, and if we did this then we'd be able to remove a lot of the duplicated commands in favor of a single command which behaves differently depending on the passed arguments.
alexr00 commentedon Mar 17, 2023
Looks like microsoft/vscode#176316 is in flux. Moving out of the March milestone.
alexr00 commentedon Dec 9, 2025
Closing, we'll keep the file and lines.