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

Re: Help with completion of option arguments



On Jul 9,  1:42am, Travis Spencer wrote:
} Subject: Re: Help with completion of option arguments
}
} > ... is, insert an empty string element into the double-parens like this:
} > 
} > _arguments : \
} >     "-A-[this is a test]:test:(('' a\:'test sub-message'))" \
} >     "-B-[notify (e-mail) admins]:notify:((''
} >         b\:'suppress interactive query (for use in crontab)'))"
} 
} Wow. Tricky.  I would never have figured that out on my own.

You might have.  '-A' by itself is '-A' with an empty argument, right?

Try it this way to see better:

_arguments : \
    "-A-[this is a test]:test:(('\:by itself, -A is a simple test'
        a\:'with this argument, -A tests a sub-message'))"



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