Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Stuff I don't understand



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