threads / patch / 39271

patchgitk: Add mouse right-click options

Subject: [PATCH] gitk: Add mouse right-click options

## tl;dr

3 messages between May 8, 2015 and May 17, 2015. Diffs are folded; open one to read it.

replies: 2people: 2as markdown or json

Michael Rappazzo· May 8, 2015, 02:29 UTC · lore
I work in a large and deep codebase, and found it useful to have these additional features in gitk.  
First, in the commit list, a right click on a branch name will add an option ('Copy branch name') to put that name on the system clipboard.
Second, in the file list of a commit, a right click on a file will add an option ('Copy path') to put the file path on the system clipboard.
Michael Rappazzo (1):
  gitk: Add mouse right-click options
 gitk-git/gitk | 2 ++
 1 file changed, 2 insertions(+)
-- 
2.4.0
Michael Rappazzo· May 8, 2015, 02:29 UTC · re: Michael Rappazzo · lore
 - 'Copy path' in the file list
 - 'Copy branch name' on a branch in the commit list
Signed-off-by: Michael Rappazzo <rappazzo@gmail.com>
---
 gitk-git/gitk | 2 ++
 1 file changed, 2 insertions(+)
Show changes to gitk-git/gitk +2 −0
diff --git a/gitk-git/gitk b/gitk-git/gitk
index 9a2daf3..6d86820 100755
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -2645,6 +2645,7 @@ proc makewindow {} {
     makemenu $headctxmenu {
 	{mc "Check out this branch" command cobranch}
 	{mc "Remove this branch" command rmbranch}
+	{mc "Copy branch name" command {clipboard clear; clipboard append $headmenuhead}}
     }
     $headctxmenu configure -tearoff 0
 
@@ -2655,6 +2656,7 @@ proc makewindow {} {
 	{mc "Highlight this only" command {flist_hl 1}}
 	{mc "External diff" command {external_diff}}
 	{mc "Blame parent commit" command {external_blame 1}}
+	{mc "Copy path" command {clipboard clear; clipboard append $flist_menu_file}}
     }
     $flist_menu configure -tearoff 0
 
-- 
2.4.0
Paul Mackerras· May 17, 2015, 00:56 UTC · re: Michael Rappazzo · lore

Re: [PATCH] gitk: Add mouse right-click options

On Thu, May 07, 2015 at 10:29:19PM -0400, Michael Rappazzo wrote:
Show 5 quoted lines
> I work in a large and deep codebase, and found it useful to have these additional features in gitk.  
> 
> First, in the commit list, a right click on a branch name will add an option ('Copy branch name') to put that name on the system clipboard.
> 
> Second, in the file list of a commit, a right click on a file will add an option ('Copy path') to put the file path on the system clipboard.
Thanks, applied.
Paul.

← back to recent threads