Skip to content

Commit 3f0322b

Browse files
committed
fix(iperf,puppet): use \{m,n\} instead of \? and \+ for POSIX sed
\? and \+ in BRE are GNU extensions.
1 parent 979f04f commit 3f0322b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

completions/iperf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ _comp_cmd_iperf()
7373
for i in "${words[@]}"; do
7474
case $i in
7575
-s | --server)
76-
filter=(command sed -e '/^Client.specific/,/^\(Server.specific.*\)\?$/d')
76+
filter=(command sed -e '/^Client.specific/,/^\(Server.specific.*\)\{0,1\}$/d')
7777
;;
7878
-c | --client)
79-
filter=(command sed -e '/^Server.specific/,/^\(Client.specific.*\)\?$/d')
79+
filter=(command sed -e '/^Server.specific/,/^\(Client.specific.*\)\{0,1\}$/d')
8080
;;
8181
esac
8282
done

completions/puppet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ _comp_cmd_puppet__certs()
2424
if [[ $1 == --all ]]; then
2525
cert_list=$(
2626
$puppetca --list --all |
27-
command sed -e 's/^[+-]\{0,1\}\s*\(\S\+\)\s\+.*$/\1/'
27+
command sed -e 's/^[+-]\{0,1\}\s*\(\S\{1,\}\)\s\{1,\}.*$/\1/'
2828
)
2929
else
3030
cert_list=$("$puppetca" --list)

test/update-test-cmd-list

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ mydir=$(
99
cat "$mydir"/t/test_*.py |
1010
tr -d '\n' |
1111
grep -Eo '@pytest.mark.complete\(([^)]*\<require_(cmd|longopt) *= *True\>[^)]*)\)' |
12-
sed -ne 's/^[^"]*"\\\?\([^_][^[:space:]"]*\)[[:space:]"].*/\1/p' |
12+
sed -ne 's/^[^"]*"\\\{0,1\}\([^_][^[:space:]"]*\)[[:space:]"].*/\1/p' |
1313
LC_ALL=C sort -u \
1414
>"$mydir"/test-cmd-list.txt

0 commit comments

Comments
 (0)