Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Completion



> But it won't complete prenom because it match with the first condition. Is
> th'ere a easy colution to have completion ?

Is this closer to what you want?

#compdef whos

_recherche () {
        if compset -P '*prenom='; then
                compadd - prenom1 prenom2
        elif compset -P '(|*&)'; then
                compadd -S '=' - nom prenom
        elif compset -P '*A'; then
                compadd - nom1 nom2
        fi
}

_arguments \
   '*:expression:_recherche'




Messages sorted by: Reverse Date, Date, Thread, Author