From 60761055d3696fced5d5acadd70485c4491efc86 Mon Sep 17 00:00:00 2001 From: druckdev Date: Fri, 2 Apr 2021 18:45:12 +0200 Subject: [PATCH] bin:filterHistory: Update characters to escape --- .local/bin/filterHistory | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/filterHistory b/.local/bin/filterHistory index c4dd9ee..11d1b12 100755 --- a/.local/bin/filterHistory +++ b/.local/bin/filterHistory @@ -62,7 +62,7 @@ echo for c in "${commands[@]}"; do # Escape all characters that sed could misinterpret. - pat="^: [0-9]+:[0-9]+;$(sed -E 's/[./?+|()*\\^$]|\[|\]/\\&/g' <<<"$c")\$" + pat="^: [0-9]+:[0-9]+;$(sed -E 's/[./?+|(){}*\\^$]|\[|\]/\\&/g' <<<"$c")\$" # Find line number of first occurrence of the command in the history file first="$(grep -Enm1 "$pat" "$1" | cut -d: -f1)"