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

Completion



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm trying to make a completion for a script, the command look like :
whos nom=nom1&prenom=prenom2

I wrote a completion funtion like :
<begin>
#compdef whos

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

_arguments \
  '*:expression:_recherche'
</end>

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

Thanks.

- --
Etienne
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFD+bv1vsnSxJjnYzIRAruxAJ9O4jfI/P17yeDEY2HNHFq8JrvLdACeKfbl
rXNChIVCM9RlyPbWdudv6AA=
=ow3l
-----END PGP SIGNATURE-----



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