getent: Add gshadow to known databases.

This commit is contained in:
Ville Skyttä 2011-04-28 20:52:50 +03:00
parent fd2bd342e0
commit 0c810d1471

View File

@ -29,7 +29,7 @@ _getent()
awk '{ print $1 }' )" -- "$cur" ) ) awk '{ print $1 }' )" -- "$cur" ) )
return 0 return 0
;; ;;
aliases|shadow) aliases|shadow|gshadow)
COMPREPLY=( $( compgen -W "$( getent "$prev" | cut -d: -f1 )" \ COMPREPLY=( $( compgen -W "$( getent "$prev" | cut -d: -f1 )" \
-- "$cur" ) ) -- "$cur" ) )
return 0 return 0
@ -40,7 +40,7 @@ _getent()
if [ $cword -eq 1 ]; then if [ $cword -eq 1 ]; then
COMPREPLY=( $( compgen -W 'passwd group hosts services protocols \ COMPREPLY=( $( compgen -W 'passwd group hosts services protocols \
networks ahosts ahostsv4 ahostsv6 aliases ethers netgroup rpc \ networks ahosts ahostsv4 ahostsv6 aliases ethers netgroup rpc \
shadow' -- "$cur" ) ) shadow gshadow' -- "$cur" ) )
fi fi
} && } &&
complete -F _getent getent complete -F _getent getent