add cmd rgm which helps search multiple line regex text with rg, syngax: rgm a,b,c,d

This commit is contained in:
wsq 2019-05-08 17:05:47 +08:00
parent f05deacb09
commit 14ef7a4fa8
2 changed files with 8 additions and 1 deletions

View File

@ -165,3 +165,10 @@ function klogs {
POD_NAME=`k get pods | grep $TEXT | awk '{print $1}'`
kubectl logs -f $POD_NAME
}
function rgm {
args=("${(@s/,/)1}")
regex=${(j:.*\n.*:)args}
echo "Rip Search with $regex..."
rg -U $regex
}

@ -1 +1 @@
Subproject commit 7bb7a7cb6fe02cce77ad31e91796f84b1a8f1011
Subproject commit 8d7e3e27c7577175330241f0279a805c471d3bf8