From 8e681991ebe83b1e566d2ff3d31bf47f7c169869 Mon Sep 17 00:00:00 2001 From: Marco Thomas Date: Mon, 29 Apr 2024 09:40:14 +0200 Subject: [PATCH] bash: add git grep fzf script --- files/shell/.shellrc.alias | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/shell/.shellrc.alias b/files/shell/.shellrc.alias index 24f906e..33b600a 100644 --- a/files/shell/.shellrc.alias +++ b/files/shell/.shellrc.alias @@ -12,6 +12,7 @@ alias rm='rm -i' ### Git fun alias gbl='git show $(git ls-files | fzf -e --reverse --bind "enter:become(git blame {1} | fzf -e --ansi --reverse | cut -f 1 -d \" \")")' +alias gg=': | fzf --reverse --bind "change:reload(git grep {q})" --bind "enter:become($EDITOR {1} +{2})" --delimiter :' ### Abbreviations alias dcr='dc down && dc up -d && dc logs -f' @@ -24,7 +25,7 @@ alias nd="nix develop ." alias nssh='SSH_AUTH_SOCK= ssh' alias s='kitten ssh' alias o='xdg-open' # to change a mime use: `xdg-mime default APPLICATION HANDLE` -t(){ +t() { tmux new-session -A -s ${1:-dev} }