Skip to content

Commit 64cba46

Browse files
committed
fix(gnokii): use double \\ in [...] for POSIX.1-2024 recommendation
Currently, in POSIX-bracket expressions [...] in the POSIX sed regular expressions, a backslash is treated literally, i.e., a single backslash is enough to include it in the set of characters. However, according to a newly added paragraph "APPLICATION USAGE/p5 - sed - POSIX Issue 8 XCU", POSIX may allow implementations to interpret backslashes in bracket expressions bracket in the future (in a similar way as POSIX awk processes). It recommends using two backslashes in bracket expressions for the future compatibility. https://pubs.opengroup.org/onlinepubs/9799919799/utilities/sort.html#tag_20_112_16
1 parent cacf97b commit 64cba46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

completions-core/gnokii.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ _comp_cmd_gnokii()
221221
# these 2 below are allowed in combination with others
222222
local main_cmd
223223
_comp_split -l main_cmd "$(printf '%s\n' "${all_cmd[@]}" |
224-
command sed -e '/--config/d;/--phone/d;s/[][\(){}|^$*+?.]/\\&/g')"
224+
command sed -e '/--config/d;/--phone/d;s/[][\\(){}|^$*+?.]/\\&/g')"
225225
# don't provide main command completions if one is
226226
# already on the command line
227227
local IFS='|'

0 commit comments

Comments
 (0)