From a81b1dc6efd6511fa680288ce42676a7cb2070cb Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Tue, 8 Feb 2022 11:57:17 -0500 Subject: feat(grfn/home): Add function for git show -s --pretty=reference Change-Id: If639ac3515e92e7535f4c433948b3ec72424c035 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5261 Reviewed-by: grfn Autosubmit: grfn Tested-by: BuildkiteCI --- users/grfn/system/home/modules/development.nix | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'users') diff --git a/users/grfn/system/home/modules/development.nix b/users/grfn/system/home/modules/development.nix index d60e6ba60759..f6ae2640aa98 100644 --- a/users/grfn/system/home/modules/development.nix +++ b/users/grfn/system/home/modules/development.nix @@ -210,6 +210,10 @@ with lib; gdelmerged = '' git branch --merged | egrep -v 'master' | tr -d '+ ' | xargs git branch -d ''; + + gref = '' + git show -s --pretty=reference "$1" | xclip -selection clipboard + ''; }; }; } -- cgit 1.4.1