From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13472 invoked by alias); 15 Dec 2011 22:34:34 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16641 Received: (qmail 14164 invoked from network); 15 Dec 2011 22:34:23 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, HTML_MESSAGE,RCVD_IN_DNSWL_LOW,T_DKIM_INVALID autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at spf-00082601.pphosted.com designates 67.231.145.42 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fb.com; h=from : to : subject : date : message-id : content-type : mime-version; s=facebook; bh=JC+6g9xg+P5aAoDP8EwvjGag+xCkEbZ5voTgyfX6HLo=; b=fbbZHf/kxCtVWKNFA2gtWxA2T13D3BDUFjalO2pxF5LbIFwXd6jdLFFk4jY37VvVbVJg /j6zs9JB4dp8FwyJ0QeR1L8NJzEEM5Ky9pk5qJCqWm1rM8t+TgHxSJgfQFEcV+aviIhj 0QU41wG4/Dmo0YrIQiEn3trM0uKIRUow7kE= From: Larry Schrof To: "zsh-users@zsh.org" Subject: Having a tough time setting up completion. Thread-Topic: Having a tough time setting up completion. Thread-Index: AQHMu3XdAqNB7xXbw0yZ5vB/QP2nIQ== Date: Thu, 15 Dec 2011 22:06:58 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.18.252] Content-Type: multipart/alternative; boundary="_000_CB0FAF822D15larrysfbcom_" MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.5.7110,1.0.211,0.0.0000 definitions=2011-12-15_06:2011-12-15,2011-12-15,1970-01-01 signatures=0 X-Proofpoint-Spam-Reason: safe --_000_CB0FAF822D15larrysfbcom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I've spent a lot to time studying the zshcompsys man page (the docs for _ar= guments specifically), but I"m still having a tough time specifying the syn= tax to do the following completion. I have a command called foo. This command takes exactly one of three forms: foo -x foo --longword foo -x is a single-letter option, --longword is a double-dashed GNU-style long = option. (These two options are synonymous.) Of these two options, either ze= ro or exactly one of them should appear. IF one of them appears, it must ap= pear immediately after foo (separated from foo, of course, by whitespace). In all cases, is a single (non-leading-dash)= word. As soon as this word is entered or completed, no other word from the= (really large) set should appear on the command line. If anyone can offer a general outline as to how I can use _arguments to imp= lement this, that would be great. I need to manually enter in all fifty wor= ds at some point, and make them mutually exclusive. Will be interesting to = see how to do that. Thanks! --_000_CB0FAF822D15larrysfbcom_--