zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@ibmth.df.unipi.it>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: 3.1.5-pws-10: _tar
Date: Fri, 05 Mar 1999 09:52:52 +0100	[thread overview]
Message-ID: <9903050852.AA19585@ibmth.df.unipi.it> (raw)
In-Reply-To: "Sven Wischnowsky"'s message of "Fri, 05 Mar 1999 09:18:58 NFT." <199903050818.JAA03410@beta.informatik.hu-berlin.de>

Sven Wischnowsky wrote:
> It was too eager to replace `*s' with `[^/]#'s. The patch below does
> the replacement only for the non-last components.

Working a lot better now, thanks.  It's maybe a little bit eager to stick
in later path components: if I type zsh-3.1.5-pws-10/Sr<TAB> it completes
(with menucompletion) all the way to Src/.cvisignore instead of hanging
around at the next slash.  I suppose normally with ordinary completion
it'll stop after the slash because the rest is ambiguous, but that won't
always be the case.

By the way, I think you can turn things like

eval patstr\="\$patstr:gs-${sep}-\*${sep}-:gs/\*\*/\*/"

into

patstr="${${patstr//$sep/*$sep}//\*##/*}"

which not only avoids the eval, it avoids difficulties with the delimiters
since the $sep is only substituted after the /'s are parsed, plus the
characters in $sep are automatically quoted by the usual noglobsubst rule.
But you have to be careful quoting metacharacters in the `before' text.
You can also now use ## to turn multiple stars into a single one with
extendedglob.  Neither form will turn *** into a single *, since the
replacement text is never used for further matching.  I don't know if
that's a bug, but probably not.

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


  reply	other threads:[~1999-03-05  9:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-05  8:18 Sven Wischnowsky
1999-03-05  8:52 ` Peter Stephenson [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-03-04 15:52 Sven Wischnowsky
1999-03-04 16:29 ` Peter Stephenson
1999-03-02 10:35 Peter Stephenson

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=9903050852.AA19585@ibmth.df.unipi.it \
    --to=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).