Added git-utils

This commit is contained in:
2022-08-12 00:24:41 +09:00
parent b10b68aa3b
commit b420add084
3 changed files with 48 additions and 12 deletions

View File

@@ -0,0 +1,12 @@
#!/bin/bash
function grepo {
grep --color=always "$1" . -r | awk '{ count++; print " ["count"] "$0 } '
echo -n "Select number to open: "
read num
IFS="
"
CHOICES=( `grep -n "$1" . -r | awk 'BEGIN{ FS=":" }{ print "notepad /g "$2" "$1 }'` )
bash -c ${CHOICES[$(( num - 1 ))]}
}