From 6434fdb86d902e77d66d9efa045e8f2d538502f2 Mon Sep 17 00:00:00 2001 From: typebrook Date: Wed, 17 Apr 2019 12:00:48 +0800 Subject: update --- tigrc | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'tigrc') diff --git a/tigrc b/tigrc index b5a90e5..27fa582 100644 --- a/tigrc +++ b/tigrc @@ -16,10 +16,12 @@ bind generic l screen-redraw # toggle/copy commit id bind generic xx +sh -c "echo -n %(commit) | head -c7 | xclip -sel c && echo Commit Clipped!" bind generic xc +sh -c "echo -n %(commit) | xclip -sel c && echo Full Commit Clipped!" -bind generic xb +sh -c "echo -n %(branch) | xclip -sel c && echo Branch Clipped!" -bind generic xrb +sh -c "echo -n %(remote):%(branch) | xclip -sel c && echo Remote Branch Clipped!" +bind generic xrb +sh -c "echo -n %(branch) | xclip -sel c && echo Branch Clipped!" +bind generic xrB +sh -c "echo -n %(remote):%(branch) | xclip -sel c && echo Remote Branch Clipped!" bind generic xf +sh -c "echo -n %(file) | xclip -sel c && echo File Clipped" -bind generic xt +sh -c "echo -n %(tag) | xclip -sel c && echo tag Clipped" +bind generic xrt +sh -c "echo -n %(tag) | xclip -sel c && echo tag Clipped" +bind generic xb +sh -c "echo -n %(blob) | head -c7 | xclip -sel c && echo Blob Clipped" +bind generic xB +sh -c "echo -n %(blob) | xclip -sel c && echo Full Blob Clipped" bind generic gr view-grep @@ -136,9 +138,8 @@ bind main I >sh -c "hub issue | tig" # blame view #==================== bind blame m >tig %(file) - -bind blame xx +sh -c "echo -n %(blob) | head -c7 | xclip -sel c && Blob Clipped" -bind blame xb +sh -c "echo -n %(blob) | xclip -sel c && Full Blob Clipped" +bind blame . >sh -c "git diff %(ref) -- %(file) | tig" +bind blame > >sh -c "git diff %(ref) --no-prefix -U1000i -- %(file) | tig" set blame-view = author:abbreviated date:relative id:yes,color line-number:yes text @@ -206,11 +207,7 @@ bind tree t +git cat-file -p %(commit) bind tree d ?rm %(file) bind tree m >tig %(file) -bind tree xx +sh -c "echo -n %(blob) | head -c7 | xclip -sel c && echo Blob Clipped" -bind tree xb +sh -c "echo -n %(blob) | xclip -sel c && echo Full Blob Clipped" bind tree xt +sh -c "git rev-parse %(commit)^{tree} | xclip -sel c -o | awk '{print \"Tree Clipped\", $1}'" -bind tree xc +sh -c "echo -n %(commit) | head -c7 | xclip -sel c && echo Commit Clipped" - #==================== # refs view #==================== -- cgit v1.2.3-70-g09d2