_jkiwi() 
{
    local cur prev opts
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD-1]}"
    opts="--help --locale --import-photos --version"

    case "${prev}" in
	#allow default complete after this argument
	--import-photos)
            return 0
            ;;
        *)
        ;;
    esac

    if [[ ${cur} == -* ]] ; then
        COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
	return 0
    fi

}
complete -F _jkiwi -o default jkiwi
