@@ -1183,7 +1183,7 @@ _comp_variable_assignments()
11831183 _terms
11841184 ;;
11851185 LANG | LC_* )
1186- _comp_compgen -- -W ' $(locale -a 2>/dev/null)'
1186+ _comp_compgen_split -- " $( locale -a 2> /dev/null) "
11871187 ;;
11881188 LANGUAGE)
11891189 _comp_delimited : -W ' $(locale -a 2>/dev/null)'
@@ -1576,7 +1576,7 @@ _ip_addresses()
15761576# TODO:API: rename per conventions
15771577_kernel_versions ()
15781578{
1579- _comp_compgen -- -W ' $(command ls /lib/modules)'
1579+ _comp_compgen_split -- " $( command ls /lib/modules) "
15801580}
15811581
15821582# This function completes on all available network interfaces
@@ -1694,26 +1694,26 @@ if [[ $OSTYPE == *@(solaris|aix)* ]]; then
16941694 # This function completes on process IDs.
16951695 _pids ()
16961696 {
1697- _comp_compgen -- -W ' $(command ps -efo pid | command sed 1d)'
1697+ _comp_compgen_split -- " $( command ps -efo pid | command sed 1d) "
16981698 }
16991699
17001700 _pgids ()
17011701 {
1702- _comp_compgen -- -W ' $(command ps -efo pgid | command sed 1d)'
1702+ _comp_compgen_split -- " $( command ps -efo pgid | command sed 1d) "
17031703 }
17041704 _pnames ()
17051705 {
1706- _comp_compgen -- - X ' <defunct>' -W ' $(command ps -efo comm | \
1707- command sed -e 1d -e " s:.*/::" -e " s/^-//" | sort -u)'
1706+ _comp_compgen_split - X ' <defunct>' -- " $( command ps -efo comm |
1707+ command sed -e 1d -e ' s:.*/::' -e ' s/^-//' | sort -u) "
17081708 }
17091709else
17101710 _pids ()
17111711 {
1712- _comp_compgen -- -W ' $(command ps ax -o pid=)'
1712+ _comp_compgen_split -- " $( command ps ax -o pid=) "
17131713 }
17141714 _pgids ()
17151715 {
1716- _comp_compgen -- -W ' $(command ps ax -o pgid=)'
1716+ _comp_compgen_split -- " $( command ps ax -o pgid=) "
17171717 }
17181718 # @param $1 if -s, don't try to avoid truncated command names
17191719 _pnames ()
@@ -1772,12 +1772,12 @@ fi
17721772_uids ()
17731773{
17741774 if type getent & > /dev/null; then
1775- _comp_compgen -- -W ' $(getent passwd | cut -d: -f3)'
1775+ _comp_compgen_split -- " $( getent passwd | cut -d: -f3) "
17761776 elif type perl & > /dev/null; then
1777- _comp_compgen -- -W ' $(perl -e ' " ' " ' while (($uid) = (getpwent)[2]) { print $uid . "\n" }' " ' " ' ) '
1777+ _comp_compgen_split -- " $( perl -e ' while (($uid) = (getpwent)[2]) { print $uid . "\n" }' ) "
17781778 else
17791779 # make do with /etc/passwd
1780- _comp_compgen -- -W ' $(cut -d: -f3 /etc/passwd)'
1780+ _comp_compgen_split -- " $( cut -d: -f3 /etc/passwd) "
17811781 fi
17821782}
17831783
@@ -1787,12 +1787,12 @@ _uids()
17871787_gids ()
17881788{
17891789 if type getent & > /dev/null; then
1790- _comp_compgen -- -W ' $(getent group | cut -d: -f3)'
1790+ _comp_compgen_split -- " $( getent group | cut -d: -f3) "
17911791 elif type perl & > /dev/null; then
1792- _comp_compgen -- -W ' $(perl -e ' " ' " ' while (($gid) = (getgrent)[2]) { print $gid . "\n" }' " ' " ' ) '
1792+ _comp_compgen_split -- " $( perl -e ' while (($gid) = (getgrent)[2]) { print $gid . "\n" }' ) "
17931793 else
17941794 # make do with /etc/group
1795- _comp_compgen -- -W ' $(cut -d: -f3 /etc/group)'
1795+ _comp_compgen_split -- " $( cut -d: -f3 /etc/group) "
17961796 fi
17971797}
17981798
@@ -1862,9 +1862,9 @@ _service()
18621862 else
18631863 local sysvdirs
18641864 _comp_sysvdirs
1865- _comp_compgen -l -- -W ' $(command sed -e " y/|/ /" \
1866- -ne " s/^.*\(U\|msg_u\)sage.*{\(.*\)}.*$/\2/p" \
1867- "${sysvdirs[0]}/${prev##*/}" 2>/dev/null) start stop'
1865+ _comp_compgen_split -l -- " $( command sed -e ' y/|/ /' \
1866+ -ne ' s/^.*\(U\|msg_u\)sage.*{\(.*\)}.*$/\2/p' \
1867+ " ${sysvdirs[0]} /${prev##*/ } " 2> /dev/null) start stop"
18681868 fi
18691869} &&
18701870 complete -F _service service
@@ -1980,9 +1980,8 @@ _allowed_groups()
19801980# @since 2.12
19811981_comp_selinux_users ()
19821982{
1983- _comp_compgen -a -- -W ' $(
1984- semanage user -nl 2>/dev/null | awk "{ print \$1 }"
1985- )'
1983+ _comp_compgen -a split -- " $( semanage user -nl 2> /dev/null |
1984+ awk ' { print $1 }' ) "
19861985}
19871986
19881987# This function completes on valid shells
0 commit comments