summaryrefslogtreecommitdiff
path: root/completions/usermod
diff options
context:
space:
mode:
Diffstat (limited to 'completions/usermod')
-rw-r--r--completions/usermod3
1 files changed, 2 insertions, 1 deletions
diff --git a/completions/usermod b/completions/usermod
index 03cc89fe..9d478c3a 100644
--- a/completions/usermod
+++ b/completions/usermod
@@ -21,7 +21,8 @@ _usermod()
;;
-G|--groups)
local prefix=; [[ $cur == *,* ]] && prefix="${cur%,*},"
- COMPREPLY=( $( compgen -P "$prefix" -g -- "${cur##*,}" ) )
+ COMPREPLY=( $( compgen -g -- "${cur##*,}" ) )
+ [[ ${#COMPREPLY[@]} -eq 1 ]] && COMPREPLY=( ${COMPREPLY/#/$prefix} )
return
;;
-R|--root)