Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Stuff I don't understand
- X-seq: zsh-users 4821
 
- From: Sven Wischnowsky <wischnow@xxxxxxxxx>
 
- To: zsh-users@xxxxxxxxxx
 
- Subject: Re: Stuff I don't understand
 
- Date: Tue, 9 Apr 2002 11:56:05 +0200
 
- In-reply-to: <JMEGJPLJEICAFFFLHGPBKEAODAAA.wsargent@xxxxxxx>
 
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
 
- References: <20020405104500.GA8357@xxxxxxxxxxxx>	<JMEGJPLJEICAFFFLHGPBKEAODAAA.wsargent@xxxxxxx>
 
Will Sargent wrote:
> ...
> 
> I don't quite understand compset.  Or local -- and what
> curcontext="$curcontext" means.  Or typeset.
Can't help you with all of this... ;-)
> Also, I'm using
> 
> modules)
>   cd $DYNAMO_HOME/..
>   match=()
>   compset -P '(#b)(*.)'
>   basedir=${match[1]//.//}
>   _alternative \
>     'modules:module:compadd -qS. $basedir*~$basedir*.*(/:t)'
>   ;;
> 
> to do my module completion but I don't really understand how compadd
> recurses through the directories.
Err... since you wrote this code you should understand, so it is
probably me not understanding your question.
Btw.: you don't need that _alternative there when there's only one
specification (i.e.: no choice anyway). You could use something like:
  local expl
  ...
  _wanted modules expl module compadd -qS. ...
> Also, whenever I use this completion it moves me out of my directory.  Is
> there any way I can do an 'inplace' cd?
Why not put the `$DYNAMO_HOME/../' before the glob pattern? The (:t)
will remove it anyway.
Bye
  Sven
-- 
Sven Wischnowsky                          wischnow@xxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author