From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7849 invoked by alias); 16 Dec 2009 20:50:21 -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: 27529 Received: (qmail 13177 invoked from network); 16 Dec 2009 20:50:09 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received-SPF: none (proxy.melb.primenet.com.au: domain at klanderman.net does not designate permitted sender hosts) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19241.18423.971888.1390@gargle.gargle.HOWL> Date: Wed, 16 Dec 2009 15:49:59 -0500 From: Greg Klanderman To: Zsh list Subject: make svn url-schemas completion configurable Reply-To: gak@klanderman.net X-Mailer: VM 8.0.12-devo-585 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid (i386-redhat-linux) Another installment in my series of svn completion improvements.. this makes the url-schemas completion configurable with a zstyle. thanks, Greg Index: Completion/Unix/Command/_subversion =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_subversion,v retrieving revision 1.30 diff -u -r1.30 _subversion --- Completion/Unix/Command/_subversion 19 Nov 2009 09:48:49 -0000 1.30 +++ Completion/Unix/Command/_subversion 16 Dec 2009 20:43:56 -0000 @@ -249,7 +249,7 @@ (( $+functions[_svn_urls] )) || _svn_urls() { - local expl ret=1 + local urlsch expl ret=1 # first try completing a remote path; if successful, we are all done.. _svn_remote_paths && return 0 @@ -260,9 +260,13 @@ _urls -S/ && ret=0 if [[ ! -prefix *://? ]] ; then - compset -S '[^:]*' - _wanted url-schemas expl 'URL schema' compadd -S '' - \ - file:// http:// https:// svn:// svn+ssh:// && ret=0 + zstyle -a ":completion:${curcontext}:" url-schemas urlsch \ + || urlsch=( file:// http:// https:// svn:// svn+ssh:// ) + + if (( $#urlsch )) ; then + compset -S '[^:]*' + _wanted url-schemas expl 'URL schema' compadd -S '' - $urlsch[@] && ret=0 + fi fi return ret