File tree Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ _comp_cmd_mock()
45
45
# This would actually depend on what the target root
46
46
# can be used to build for...
47
47
_comp_compgen_split -- " $( command rpm --showrc | command sed -ne \
48
- ' s/^\s *compatible\s\s* archs\s*:\s *\(.*\)/\1/i p' ) "
48
+ ' s/^[[:space:]] *compatible[[:space:]]\{1,\} archs[[:space:]]*:[[:space:]] *\(.*\)/\1/i p' ) "
49
49
return
50
50
;;
51
51
--enable-plugin | --disable-plugin)
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ _comp_cmd_yum__compgen_repolist()
25
25
# Drop first ("repo id repo name") and last ("repolist: ...") rows
26
26
_comp_compgen_split -- " $(
27
27
yum --noplugins -C repolist " $1 " 2> /dev/null |
28
- command sed -ne ' /^repo\s\s* id/d' -e ' /^repolist:/d' \
28
+ command sed -ne ' /^repo[[:space:]]\{1,\} id/d' -e ' /^repolist:/d' \
29
29
-e ' s/[[:space:]].*//p'
30
30
) "
31
31
}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ _comp_cmd_chronyc__command_args()
4
4
{
5
5
local -a args
6
6
_comp_split args " $( " $1 " help 2> /dev/null |
7
- _comp_awk ' /^' " $prev " ' \s [^ []/ { gsub("\\|", " ", $2); print $2 }' ) "
7
+ _comp_awk ' /^' " $prev " ' [ \t] [^ []/ { gsub("\\|", " ", $2); print $2 }' ) "
8
8
case $args in
9
9
\< address\> ) _comp_compgen_known_hosts -- " $cur " ;;
10
10
\< * ) ;;
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ _comp_cmd_puppet__certs()
24
24
if [[ $1 == --all ]]; then
25
25
cert_list=$(
26
26
$puppetca --list --all |
27
- command sed -e ' s/^[+-]\{0,1\}\s *\(\S\ {1,\}\)\s \{1,\}.*$/\1/'
27
+ command sed -e ' s/^[+-]\{0,1\}[[:space:]] *\([^[:space:]]\ {1,\}\)[[:space:]] \{1,\}.*$/\1/'
28
28
)
29
29
else
30
30
cert_list=$( " $puppetca " --list)
@@ -35,7 +35,7 @@ _comp_cmd_puppet__certs()
35
35
_comp_cmd_puppet__types ()
36
36
{
37
37
puppet_types=$(
38
- puppet describe --list | command sed -e ' s/^\(\S \{1,\}\).*$/\1/'
38
+ puppet describe --list | command sed -e ' s/^\([^[:space:]] \{1,\}\).*$/\1/'
39
39
)
40
40
_comp_compgen -a -- -W " $puppet_types "
41
41
}
@@ -47,7 +47,7 @@ _comp_cmd_puppet__references()
47
47
puppetdoc=puppetdoc
48
48
49
49
puppet_doc_list=$(
50
- $puppetdoc --list | command sed -e ' s/^\(\S \{1,\}\).*$/\1/'
50
+ $puppetdoc --list | command sed -e ' s/^\([^[:space:]] \{1,\}\).*$/\1/'
51
51
)
52
52
_comp_compgen -a -- -W " $puppet_doc_list "
53
53
}
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ _comp_cmd_rpm__macros()
45
45
_comp_cmd_rpm__buildarchs ()
46
46
{
47
47
_comp_compgen_split -- " $( " ${1:- rpm} " --showrc | command sed -ne \
48
- ' s/^\s *compatible\s\s* build\s\s* archs\s*:\s *\(.*\)/\1/ p' ) "
48
+ ' s/^[[:space:]] *compatible[[:space:]]\{1,\} build[[:space:]]\{1,\} archs[[:space:]]*:[[:space:]] *\(.*\)/\1/ p' ) "
49
49
}
50
50
51
51
# shellcheck disable=SC2120
You can’t perform that action at this time.
0 commit comments