From eda8015880106a2aef69c77a52f85b32599d4257 Mon Sep 17 00:00:00 2001 From: Kylie McClain Date: Mon, 13 Apr 2015 20:42:43 -0400 Subject: [PATCH] fix special char escaping so `mawk` likes it --- z.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/z.sh b/z.sh index da629ae..713b452 100644 --- a/z.sh +++ b/z.sh @@ -163,7 +163,7 @@ _z() { # use a copy to escape special characters, as we want to return # the original. yeah, this escaping is awful. clean_short = short - gsub(/[\(\)\[\]\|]/, "\\\\&", clean_short) + gsub(/\[\(\)\[\]\|\]/, "\\\\&", clean_short) for( x in matches ) if( matches[x] && x !~ clean_short ) return return short }