_shells: Rewrite in plain bash instead of using grep.
This commit is contained in:
parent
d9a5a88332
commit
d0c4f5ddd2
@ -1142,9 +1142,10 @@ _allowed_groups()
|
||||
#
|
||||
_shells()
|
||||
{
|
||||
COMPREPLY+=( $( compgen -W \
|
||||
'$( command grep "^[[:space:]]*/" /etc/shells 2>/dev/null )' \
|
||||
-- "$cur" ) )
|
||||
local shell rest
|
||||
while read -r shell rest; do
|
||||
[[ $shell == /* && $shell == "$cur"* ]] && COMPREPLY+=( $shell )
|
||||
done 2>/dev/null < /etc/shells
|
||||
}
|
||||
|
||||
# This function completes on valid filesystem types
|
||||
|
Loading…
x
Reference in New Issue
Block a user