zsh-users
 help / color / mirror / code / Atom feed
From: Konstantin Sobolev <kos@supportwizard.com>
To: Peter Stephenson <pws@csr.com>
Cc: Zsh users list <zsh-users@sunsite.dk>
Subject: Re: java class names completion widget
Date: Thu, 15 Jun 2006 22:41:18 +0400	[thread overview]
Message-ID: <200606152241.18524.kos@supportwizard.com> (raw)
In-Reply-To: <200606151619.k5FGJBFb022067@news01.csr.com>

On Thursday 15 June 2006 20:19, Peter Stephenson wrote:

> _expand_java_path now contains:
>
>   #autoload
>   local MATCH MBEGIN MEND pref suf
>
>   pref="**/${PREFIX//(#m)[[:upper:]]/${MATCH}[^[:upper:]]#}"
>   suf="${SUFFIX//(#m)[[:upper:]]/${MATCH}[^[:upper:]]#}*.java"
>
>   local expl
>   local -a exp
>   exp=(${~pref}${~suf}(N))
>   if (( ${#exp} )); then
>     _wanted java-files expl 'java source file (search)' \
>       compadd -U -a exp
>   else
>     return 1
>   fi
>

Great!
It took me around 2 hours to understand how these 12 lines work, and I'm still 
a bit confused by the magic happening behind _wanted :)

Many thanks

-- 
/KoS
* I Print on Steel with an Industrial Laser			      


      reply	other threads:[~2006-06-15 18:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-05 18:40 Konstantin Sobolev
2006-06-07 10:47 ` Peter Stephenson
2006-06-15 15:38   ` Konstantin Sobolev
2006-06-15 16:19     ` Peter Stephenson
2006-06-15 18:41       ` Konstantin Sobolev [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200606152241.18524.kos@supportwizard.com \
    --to=kos@supportwizard.com \
    --cc=pws@csr.com \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).