zsh-workers
 help / color / mirror / code / Atom feed
From: "Kiddle, Oliver" <KiddleO@logica.com>
To: "'Peter Stephenson <pws@ibmth.df.unipi.it>'" <pws@ibmth.df.unipi.it>
Cc: "'zsh-workers@sunsite.auc.dk'" <zsh-workers@sunsite.auc.dk>
Subject: PATCH: _subscript, Re: pws-23
Date: Mon, 21 Jun 1999 12:52:37 +0100	[thread overview]
Message-ID: <4FBF540FF16FD1119D9600A0C94B2B51F29E95@napier.logica.co.uk> (raw)

_subscript in pws-23 seems to have been slightly damaged, probably due to
word wrapping somewhere. The list= line for associative arrays should end
with " ) and the following line should not have the closing bracket. A patch
for this follows but I've also made a slight change: I use print -D to print
the value of the array. This is rather useful with things like path where
things get compacted to something like ~/bin. If it breaks anything else, we
could use: if [[ ${compstate[parameter]} = *path* ]]; then, to only do it
for path arrays.

What might be useful is to add make zsh expand ${(D)...} in a similar way to
print -D.

BTW, the _hosts change which I sent last Friday (and which isn't in pws-23)
doesn't work with my hosts file at home so I'll send a replacement later in
the week. Peter: thanks for putting the .bin links in for the bzipped
source: it didn't corrupt this time.

Oliver Kiddle

*** Completion/Base/_subscript.old	Sun Jun 20 14:32:31 1999
--- Completion/Base/_subscript	Mon Jun 21 12:38:24 1999
***************
*** 13,20 ****
    list=()
    for i in "$ind[@]"; do
      [[ "$i" = ${PREFIX}*${SUFFIX} ]] &&
!         list=( "$list[@]" "${(r:4:: ::):)i}
${(P)${compstate[parameter]}[$i]}
! )
    done
  
   if [[ "$RBUFFER" = \]* ]]; then
--- 13,20 ----
    list=()
    for i in "$ind[@]"; do
      [[ "$i" = ${PREFIX}*${SUFFIX} ]] &&
! 	  list=( "$list[@]" \
! 	      "${(r:4:: ::):)i} `print -D
${(P)${compstate[parameter]}[$i]}`" )
    done
  
   if [[ "$RBUFFER" = \]* ]]; then


             reply	other threads:[~1999-06-21 11:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-21 11:52 Kiddle, Oliver [this message]
1999-06-21 11:43 ` Peter Stephenson
1999-07-01 14:34   ` PATCH: completion for hosts and character classes Oliver Kiddle
1999-07-02  9:10     ` Peter Stephenson
1999-06-21 13:04 ` PATCH: _subscript, Re: pws-23 Andrej Borsenkow

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=4FBF540FF16FD1119D9600A0C94B2B51F29E95@napier.logica.co.uk \
    --to=kiddleo@logica.com \
    --cc=pws@ibmth.df.unipi.it \
    --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).