# sh(1) completion


comp_include _get_cword


_chsh()
{
    local cur prev

    COMPREPLY=()
    cur=`_get_cword`
    prev=${COMP_WORDS[COMP_CWORD-1]}

    if [ "$prev" = "-s" ]; then
      if [ -f /etc/debian_version ]; then
        COMPREPLY=( $( </etc/shells ) )
      else
        COMPREPLY=( $( chsh -l | grep "^$cur" ) )
      fi
    else
      COMPREPLY=( $( compgen -u -- $cur ) )
    fi

    return 0
}
