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

Escaping of : in a _describe completion


I am trying to build a small completion for etherwake, which gives me
some MAC addresses together with their hostnames as descriptions. I came
up with something like this:

    _etherwake() {
        typeset -a etherwake_desc;
        _describe etherwake etherwake_desc;
    compdef _etherwake etherwake

This does not work, however, as the first `:' of each string in the
etherwake_desc array is used to separate the completion from the
description. I tried escaping the `:' characters of the MAC addresses
with `\', which did not help. Neither did putting ' or \" around the MAC

How can I do it right?


Frank Blendinger | fb(at)intoxicatedmind.net | GPG: 0x0BF2FE7A
Fingerprint: BB64 F2B8 DFD8 BF90 0F2E 892B 72CF 7A41 0BF2 FE7A

Attachment: signature.asc
Description: Digital signature

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