Permalink
Browse files

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
  • Loading branch information...
1 parent 8272e6f commit 9162239fbd225705d0a121be8c8d17123d1741ab @rupa committed Jul 4, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 z.sh
View
@@ -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

0 comments on commit 9162239

Please sign in to comment.