From 33b239aee541fa036c310461dc07f7130a5b989a Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Tue, 9 Nov 2021 10:55:32 +0100 Subject: [PATCH] bash: sgc angelegt --- .bash_functions | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.bash_functions b/.bash_functions index d506f71..24f183e 100644 --- a/.bash_functions +++ b/.bash_functions @@ -12,6 +12,23 @@ ssh() { #() ist die kurzform von function tmux rename-window "$*" command ssh "$@" } + + +function sgc { + case "$1" in + --help) + echo "Suche in der kompletten git-history nach '$1'" + echo "sgc = search git commit" + echo "sgc " + ;; + "") + echo "Suchbegriff fehlt..." + ;; + *) + git grep "$1" $(git rev-list --all) + esac +} + function m2m { if [[ "$1" == "--help" ]]; then echo "Sende Datei '$2' per Mail; Betreff = '$1'"