Skip to content

Commit 39a01d3

Browse files
committed
fix(gnokii): escape ERE special characters in constructed regex
1 parent c609196 commit 39a01d3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: completions/gnokii

+2-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,8 @@ _comp_cmd_gnokii()
225225

226226
# these 2 below are allowed in combination with others
227227
local main_cmd
228-
_comp_split -l main_cmd "$(command sed -e '/--config/d;/--phone/d' <<<"$all_cmd")"
228+
_comp_split -l main_cmd "$(command sed -e '/--config/d;/--phone/d' -e \
229+
's/[][\(){}|^$*+?.]/\\&/g' <<<"$all_cmd")"
229230
# don't provide main command completions if one is
230231
# already on the command line
231232
local IFS='|'

0 commit comments

Comments
 (0)