From: Sven Wischnowsky <wischnow@berkom.de>
To: zsh-users@sunsite.dk
Subject: Re: Stuff I don't understand
Date: Tue, 9 Apr 2002 11:56:05 +0200 [thread overview]
Message-ID: <15538.47797.753615.94046@wischnow.berkom.de> (raw)
In-Reply-To: <JMEGJPLJEICAFFFLHGPBKEAODAAA.wsargent@atg.com>
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@berkom.de
next prev parent reply other threads:[~2002-04-09 9:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-04 23:49 Rough Draft of Article on Writing Completion Functions John Beppu
2002-04-05 9:57 ` Peter Stephenson
2002-04-05 10:01 ` Peter Stephenson
2002-04-05 10:45 ` Joakim Ryden
2002-04-05 10:56 ` Peter Stephenson
2002-04-05 11:12 ` Joakim Ryden
2002-04-05 18:43 ` Stuff I don't understand Will Sargent
2002-04-09 9:56 ` Sven Wischnowsky [this message]
2002-04-09 11:25 ` Bart Schaefer
2002-04-11 20:04 ` Rough Draft of Article on Writing Completion Functions John Beppu
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=15538.47797.753615.94046@wischnow.berkom.de \
--to=wischnow@berkom.de \
--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).