From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: help with _match, globcomplete etc. (with PATCH)
Date: Mon, 14 Feb 2000 14:03:25 +0100 (MET) [thread overview]
Message-ID: <200002141303.OAA10037@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Oliver Kiddle's message of Mon, 14 Feb 2000 12:23:44 +0000
Oliver Kiddle wrote:
> Sven Wischnowsky wrote:
>
> > (there is almost no real reason to use
> > GLOB_COMPLETE nowadays, the _match completer should be better -- and
> > configurable).
>
> I've just been trying to fathom out what is going on with respect to
> when zsh expands, menu completes expansions and doesn't expand. It all
> is a little bit complicated, especially as the behaviour is controlled
> by a mix of options, styles and the choice of widget that tab is bound
> to.
>
> Part of the trouble is the way zsh's shell expansion works. If you use
> expand-or-complete, I can't see any way of customising what is and isn't
> expanded - variables, globs and history are, tildes are not. The
> behaviour which I would like is that variables are not expanded unless I
> specifically use a widget bound to '^X$' - like tcsh's expand-variables
> widget.
You can bind expand-word to ^X$. Expansion of parameter substitutions
is a problem, because the completion (shell) code doesn't get the
whole string. We only get the stuff after the $, so we can't really
change such things.
> Would it be possible for the shell expansion used in completion
> to be controlled by a style?
Have you had a look at the _expand completer? And the _expand_word
bindable command? (The latter had a bug -- result of copying the
context stuff -- that's what the first hunk is for).
> The reason I still use glob_complete is that it allows some action when
> completing glob patterns (menu completion though I'd prefer expansion in
> the case of files) while not expanding variables.
>
> I can however see that the _match completer is better, mainly in that I
> can choose menu completion where only one argument is required and
> expansion where many are required.
>
> Another thing which I would like to configure with expansion is when
> there is only one match, I'd prefer if the space suffix was not added -
> this is one of the things that makes the variable expansion annoying.
> Ideally, the suffix would be as if normal completion was used so
> directories would get a '/'.
When speaking about variables: see above. When speaking about other
expansions: _match does that and _expand could be made to do it
(adding a loop that appends slashes to directory names).
There were some problems with $compstate[last_prompt] and with
complist not giving up when we didn't go back to the previous prompt.
Bye
Sven
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~2000-02-14 13:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-02-14 13:03 Sven Wischnowsky [this message]
2000-02-15 11:09 ` help with _match, globcomplete etc Oliver Kiddle
2000-02-14 13:07 help with _match, globcomplete etc. (with PATCH) Sven Wischnowsky
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=200002141303.OAA10037@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@sunsite.auc.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).