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

Escaping of : in a _describe completion



Hi,

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;
        etherwake_desc=("00:0c:6e:74:16:77:host1";"00:1b:63:31:4a:6b:host2");
        _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
addresses.

How can I do it right?


Greetings,
Frank

-- 
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