From 9162239fbd225705d0a121be8c8d17123d1741ab Mon Sep 17 00:00:00 2001 From: rupa Date: Wed, 4 Jul 2012 00:27:26 -0400 Subject: [PATCH] fix for gawk with regex chars in paths Sub out regex chars in paths before comparing them. Fixes gawk and doesn't seem to break other awks. Closes #54 --- z.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/z.sh b/z.sh index ff3645e..f310bcb 100755 --- a/z.sh +++ b/z.sh @@ -142,7 +142,7 @@ _z() { if( short == "/" ) return # escape regex chars in right hand side - #gsub(/[\(\[\|]/, "\\\&", short) + gsub(/[\(\[\|]/, "\\&", short) # shortest match must be common to each match for( i in matches ) if( matches[i] && i !~ short ) return