bin:filterHistory: Update characters to escape

This commit is contained in:
2021-04-02 18:45:12 +02:00
parent 141e422910
commit 60761055d3

View File

@@ -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)"