File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -2017,16 +2017,19 @@ _comp_compgen_usergroup()
2017
2017
# Completing group after 'user\:gr<TAB>'.
2018
2018
# Reply with a list of groups prefixed with 'user:', readline will
2019
2019
# escape to the colon.
2020
- local _prefix
2021
- _prefix=${cur%%* ([^:])}
2022
- _prefix=${_prefix// \\ / }
2020
+ local tmp
2023
2021
if [[ ${1-} == -u ]]; then
2024
- _comp_compgen -c " ${cur#*: } " allowed_groups
2022
+ _comp_compgen -v tmp - c " ${cur#*: } " allowed_groups
2025
2023
else
2026
- _comp_compgen -c " ${cur#*: } " -- -g
2024
+ _comp_compgen -v tmp -c " ${cur#*: } " -- -g
2025
+ fi
2026
+ if (( ${# tmp[@]} )) ; then
2027
+ local _prefix=${cur%%* ([^:])}
2028
+ _prefix=${_prefix// \\ / }
2029
+ local -a _tmp=(" ${tmp[@]/#/ $_prefix } " )
2030
+ _comp_unlocal tmp
2031
+ _comp_compgen_set " ${_tmp[@]} "
2027
2032
fi
2028
- (( ${# COMPREPLY[@]} )) &&
2029
- COMPREPLY=(" ${COMPREPLY[@]/#/ $_prefix } " )
2030
2033
elif [[ $cur == * :* ]]; then
2031
2034
# Completing group after 'user:gr<TAB>'.
2032
2035
# Reply with a list of unprefixed groups since readline with split on :
You can’t perform that action at this time.
0 commit comments