zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: pws-20 parameter completion can't handle new syntax
Date: Tue, 1 Jun 1999 11:30:04 +0200 (MET DST)	[thread overview]
Message-ID: <199906010930.LAA24609@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Bart Schaefer"'s message of Tue, 1 Jun 1999 00:00:06 +0000


Bart Schaefer wrote:

> Not surprisingly, this doesn't work (with new-style completion stuff loaded):
> 
> zagzig% echo ${"comp<TAB>
> <BEEP>

Hm, yes. The patch below makes this work, but it also makes `${ comp<TAB>'
work, because check_param() gets the string in a form where the quote
is replaced by a space.

A better solution may follow once we come to the other completion-in-quotes
problems.

> Here's another, probably unrelated, unexpected behavior:
> 
> zagzig% echo ${comp
>                ^place cursor on "c" and press TAB
> zagzig% echo ${comp} 
>                      ^cursor is now here, but there is no parameter
>                       named "comp".

Ahem, there was such a parameter because _parameters also tried to
complete local parameters as a fall-back. That was simply wrong.

Bye
 Sven

diff -u os/Zle/zle_tricky.c Src/Zle/zle_tricky.c
--- os/Zle/zle_tricky.c	Tue Jun  1 11:28:34 1999
+++ Src/Zle/zle_tricky.c	Tue Jun  1 11:22:35 1999
@@ -710,7 +710,7 @@
 		*b != '=' && *b != Equals &&
 		*b != '~' && *b != Tilde)
 		break;
-	if (*b == '#' || *b == Pound || *b == '+')
+	if (*b == '#' || *b == Pound || *b == '+' || *b == ' ')
 	    b++;
 
 	e = b;
diff -u oc/Core/_parameters Completion/Core/_parameters
--- oc/Core/_parameters	Tue Jun  1 11:28:18 1999
+++ Completion/Core/_parameters	Tue Jun  1 11:21:21 1999
@@ -4,5 +4,4 @@
 # extra options of compadd. It first tries to complete only non-local
 # parameters. All arguments are given to compadd.
 
-compadd "$@" - "${(@)${(@)${(@)${(@f)$(typeset)}:#*local *\=*}%%\=*}##* }" ||
-    compadd "$@" - "${(@)${(@)${(@f)$(typeset)}%%\=*}##* }"
+compadd "$@" - "${(@)${(@)${(@)${(@f)$(typeset)}:#*local *\=*}%%\=*}##* }"

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


             reply	other threads:[~1999-06-01  9:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-01  9:30 Sven Wischnowsky [this message]
1999-06-01 10:04 ` Bart Schaefer
  -- strict thread matches above, loose matches on Subject: below --
1999-06-01 10:39 Sven Wischnowsky
1999-06-01  0:00 Bart Schaefer

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=199906010930.LAA24609@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).