Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: java class names completion widget
- X-seq: zsh-users 10376
- From: Konstantin Sobolev <kos@xxxxxxxxxxxxxxxxx>
- To: Peter Stephenson <pws@xxxxxxx>
- Subject: Re: java class names completion widget
- Date: Thu, 15 Jun 2006 22:41:18 +0400
- Cc: Zsh users list <zsh-users@xxxxxxxxxx>
- In-reply-to: <200606151619.k5FGJBFb022067@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: SupportWizard
- References: <200606052240.27880.kos@xxxxxxxxxxxxxxxxx> <200606151938.36646.kos@xxxxxxxxxxxxxxxxx> <200606151619.k5FGJBFb022067@xxxxxxxxxxxxxx>
- Reply-to: kos@xxxxxxxxxxxxxxxxx
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author