Run the gitk viewer with the specified arguments Signed-off-by: Bernt Hansen <be...@norang.ca> --- Hi,
I've recently started using magit instead of the commandline interface for common git operations. One thing I was missing was access to gitk for viewing history. This patch adds a simple interface to gitk which prompts for arguments and runs the gitk viewer. I've bound this to K (gitK) since that seems to be available. I'm sure this patch can be improved upon but it's working well for me so far. This patch is available at git://git.norang.ca/magit gitk Thanks for magit! -Bernt magit.el | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/magit.el b/magit.el index a911950..6b1450c 100644 --- a/magit.el +++ b/magit.el @@ -1181,6 +1181,7 @@ Many Magit faces inherit from this one by default." (define-key map (kbd "x") 'magit-reset-head) (define-key map (kbd "X") 'magit-reset-working-tree) (define-key map (kbd "k") 'magit-discard-item) + (define-key map (kbd "K") 'magit-gitk-command) (define-key map (kbd "!") 'magit-shell-command) (define-key map (kbd "RET") 'magit-visit-item) (define-key map (kbd "SPC") 'magit-show-item-or-scroll-up) @@ -2370,6 +2371,10 @@ in log buffer." (magit-process-popup-time 0)) (magit-run* args nil nil nil t))) +(defun magit-gitk-command (command) + (interactive "sCommand: ") + (shell-command (concat "gitk " command))) + (defun magit-read-remote (prompt def) (completing-read (if def (format "%s (default %s): " prompt def) -- 1.6.5.rc2.17.gdbc1b