From c384c4910645e63645f9c9552f1a6fe9c8136ded Mon Sep 17 00:00:00 2001 From: Shulhan Date: Sat, 3 Jun 2023 15:33:37 +0700 Subject: git-gui: add shortcut for visualize current branch and all branch The shortcut for visualizing current branch is CTRL+H (H derived from [H]istory). The shortcut for visualizing all branch is CTRL+K. --- git-gui/git-gui.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh index 23fe76e498..26c34194cf 100755 --- a/git-gui/git-gui.sh +++ b/git-gui/git-gui.sh @@ -2632,11 +2632,13 @@ set ui_browse_current [.mbar.repository index last] .mbar.repository add command \ -label [mc "Visualize Current Branch's History"] \ - -command {do_gitk $current_branch} + -command {do_gitk $current_branch} \ + -accelerator $M1T-H set ui_visualize_current [.mbar.repository index last] .mbar.repository add command \ -label [mc "Visualize All Branch History"] \ - -command {do_gitk --all} + -command {do_gitk --all} \ + -accelerator $M1T-K .mbar.repository add separator proc current_branch_write {args} { @@ -2923,6 +2925,10 @@ unset doc_path doc_url wm protocol . WM_DELETE_WINDOW do_quit bind all <$M1B-Key-q> do_quit bind all <$M1B-Key-Q> do_quit +bind all <$M1B-Key-h> {do_gitk $current_branch} +bind all <$M1B-Key-H> {do_gitk $current_branch} +bind all <$M1B-Key-k> {do_gitk --all} +bind all <$M1B-Key-K> {do_gitk --all} set m1b_w_script { set toplvl_win [winfo toplevel %W] -- cgit v1.3