chsh: Use _parse_usage.

This commit is contained in:
Ville Skyttä 2011-05-15 20:10:37 +03:00
parent d8e22da94b
commit fbf0bd3059

View File

@ -17,9 +17,8 @@ _chsh()
;;
esac
if [[ "$cur" == -* && "$( uname -s )" == @(Linux|GNU|GNU/*) ]]; then
COMPREPLY=( $( compgen -W '--shell --list-shells --help --version' \
-- "$cur" ) )
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) )
else
_allowed_users
fi