zsh-workers
 help / color / mirror / code / Atom feed
From: Zoltan Hidvegi <hzoli@cs.elte.hu>
To: schaefer@z-code.ncd.com
Cc: zsh-workers@math.gatech.edu
Subject: Re: Programmable completion bug in beta18
Date: Wed, 22 May 1996 21:26:20 +0200 (MET DST)	[thread overview]
Message-ID: <199605221926.VAA30731@bolyai.cs.elte.hu> (raw)
In-Reply-To: <960522114756.ZM12275@zyrcon.z-code.com> from "Barton E. Schaefer" at "May 22, 96 11:47:55 am"

> On May 22,  8:08pm, Zoltan Hidvegi wrote:
> } Subject: Re: Programmable completion bug in beta18
> }
> } > compctl -g '*(D-/)' cd
> } > {jagor}[0][~/hrv/zsh-2.6-beta18]$ cd [^D]
> } > 
> } > ^D gives no output. TAB refuses to menu-complete. Shortly, it doesn't work.
> } 
> } You need to set extended_glob for that.
> 
> For what, specifically?
> 
> } I think that extended_glob should be set by default when zsh is not called
> } as sh or ksh.
> 
> There's a whole lot of extendedglob stuff that I don't normally want, so
> up through 2.5* I've not had it set.  Under what circumstances is it now
> required where it was not required before?

In case of compctl, the pattern is stored as a string, and tokenize() is
called to tokenize it, the same function which is used for GLOB_SUBST.  My
previous example was not really correct.  The problem is that:

% foo='*(/)'
% echo $foo

If zsh is called as sh this should print the files ending in (/) instead of
the directories.

echo *(D-/) is syntactically incorrect under sh and it still works in zsh
without extended_glob.  Everything is affected which uses tokenize()
internally.  E.g. the builtin command arguments after -m only know *, ? and
[...].  Elternatives does not work line (foo|bar)*.  Maybe some more
fine-grained control of glob behaviour is preferable.  With sh (, | and )
are ordinary characters in glob patterns.  Maybe we can keep the original
zsh behaviour and add a new option something like SH_GLOB wich does not
handle (, | and ) specially.

Zoltan



  reply	other threads:[~1996-05-22 19:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-05-22 17:28 Hrvoje Niksic
1996-05-22 18:08 ` Zoltan Hidvegi
1996-05-22 18:47   ` Barton E. Schaefer
1996-05-22 19:26     ` Zoltan Hidvegi [this message]
1996-05-22 19:36       ` Hrvoje Niksic
1996-05-22 19:46         ` Zoltan Hidvegi
1996-05-22 19:30     ` Mark Borges
1996-05-22 19:53       ` Zoltan Hidvegi

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=199605221926.VAA30731@bolyai.cs.elte.hu \
    --to=hzoli@cs.elte.hu \
    --cc=schaefer@z-code.ncd.com \
    --cc=zsh-workers@math.gatech.edu \
    /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).