From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19909 invoked by alias); 5 Feb 2013 10:11:57 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 31028 Received: (qmail 15794 invoked from network); 5 Feb 2013 10:11:55 -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=-0.9 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_NONE, T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL,UNPARSEABLE_RELAY autolearn=no version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at yahoo.co.uk does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1360058728; bh=VyAX+K8azcSIzFkoLobMeWZR6rdwoj86v4DcBQ1Q+Jk=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:Received:Received:Received:In-reply-to:From:References:To:Subject:MIME-Version:Content-Type:Content-ID:Date:Message-ID; b=W42S7oIpCwI/G/nk0XGf2tNmPBUSJDCA1N6f6eiuFHgryzPstAe/Rllp1kzp8dSSwtJTMI9qPDjvb+6thTYxY7uC3CZS6MKdgqUOPrYSfnVWBdhFDKlHPZNkm/d4yeLsPSl6Ro7sDkCvacvfnO1ahAqdAxCBZAQTktj3nebmxLY= X-Yahoo-Newman-Id: 480454.58718.bm@smtp128.mail.ird.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: ZxjL27IVM1lNXNMVOrTbtfMlRC4pxtlXpMHEzibkZJ0yepa eSXj2ju5SLblyGIwrMvRjngZzy4NNerwmz2Kz5hOoJJxi73yqnSErvv0oHDh 85rEbmFF.Pd4kPYyibB4Nea2ChK4u5pKWB6ATzkEhpaPpm6_fTNqgMcNOHWT 5SU5R_nBfEJG_w9VEjMY.NirOYC.ZiOkfpzS6YmoLVJxJrVZuCKZYkuHVGxo vSW9ghdR3K8sp8HKV9SXqL_xLR1CP9PpckTaMIp0hah22DykusMlWJ3o9y58 q3yFWVS5bd3HFYBz65KP1PCqF96ysDsYXiM_lmrvIE7UREk_6WNzhajGgOhz 15L5ynQqlExfN3Wfxp7zFxvl5vrb4se8YllsiVFjnt0QuKBjITbFAMdlaDDA YUX3M.hRwWVuBDCcgAkZR3owR4jyWHQUc1vYJZ56COI9mWA-- X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- In-reply-to: <20130204042609.GA1571@redoubt.spodhuis.org> From: Oliver Kiddle References: <20130203175328.GL2279@ragnarok.teratorn.org> <20130204042609.GA1571@redoubt.spodhuis.org> To: zsh-workers@zsh.org Subject: Re: Update _twisted completion MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3980.1360058210.1@quattro> Date: Tue, 05 Feb 2013 11:05:27 +0100 Message-ID: <4050.1360058727@quattro> Phil Pennock wrote: > Wait what, a function to be eval'd, so can do anything in the shell > environment, which runs because I press tab when seeing what options > this "command the user is not familiar with" might offer? I don't think it is much worse than what the current _twisted does. And in the end you have little choice than to trust all the software you install and use on your system. It'd be better if the packaging for Linux distributions (or BSD, opencsw etc) coordinated things so that completion functions that aren't distributed with zsh can go in somewhere suitable (/usr/share/zsh/site-functions or /etc/zsh_completion.d) and then get checked by compaudit. I'm not especially familiar with twisted but in general, if the completion function is going to be calling binaries to generate matches, it is better to produce lists of things like sub-commands, options, etc than a full completion function. These can then be used by any shell. Another comment on _twisted is that using echo for error messages in completion functions tends not to work too well because it mucks up the line editor. `zle -M' or simply printing nothing (but generating no matches) work better. Oliver