zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@cambridgesiliconradio.com>
To: zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: Re: (file) completion in compinstall
Date: Fri, 28 Apr 2000 12:56:24 +0100	[thread overview]
Message-ID: <0FTQ00FHA6HZ5M@la-la.cambridgesiliconradio.com> (raw)
In-Reply-To: "Your message of Fri, 28 Apr 2000 15:13:23 +0400." <000301bfb102$c4936c30$21c9ca95@mow.siemens.ru>

> As I understand, compinstall is using vared to get input. Currently,
> completion in the first prompt (for the file name) tries to complete
> commands; I did not try any other (is there anything accept file names
> that may be sensibly completed? I believe, everything else is menu
> driven or free text input)

I was going to remark on this, too, but forgot.  As far as I know,
completion usually just treats a line of vared input exactly the same way
as an ordinary command line.  This is very rarely the most useful
behaviour; a better default would be ordinary default completion,
i.e. assume a null command and treat the rest as command words.

There's some low-level support: compstate[vared] gets set to the name of
the parameter being edited and can be detected in completion functions.
However, there doesn't seem to be any support in the function system with
the exception of some commented-out code in _first, which would treat the
line being edited as if you were editing an assignment to that variable.  I
can't remember why that's not the default.

It might be possible to change this in compinstall by setting
compstate[context] directly, but come to think of it, I doubt if it
actually is possible outside a completion widget.  Even then, making the
value local would be unpleasant.

I'd prefer a more general solution to completion with vared, if Sven has
any ideas...

-- 
Peter Stephenson <pws@cambridgesiliconradio.com>
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070


  reply	other threads:[~2000-04-28 11:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-04-28 11:13 Andrej Borsenkow
2000-04-28 11:56 ` Peter Stephenson [this message]
2000-04-28 12:14 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=0FTQ00FHA6HZ5M@la-la.cambridgesiliconradio.com \
    --to=pws@cambridgesiliconradio.com \
    --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).