From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: Re: A couple completion glitches
Date: Thu, 29 Jun 2000 09:09:06 +0200 (MET DST) [thread overview]
Message-ID: <200006290709.JAA04198@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Wayne Davison's message of Sun, 25 Jun 2000 01:38:07 -0700 (PDT)
Wayne Davison wrote:
> ...
>
> It still seems strange to me that (without the above suffix option)
> foo* gets glob expansion but ~/foo* does not. Surely this should not
> be the default even if this turns out (for some strange reason) not to
> be a bug.
This really wasn't intended; I didnt' think of the interaction with
pattern characters in the suffix.
How about this patch: it changes the meaning of the suffix style to
`don't expand if there is a suffix, unless that contains something
exapandable'.
I still think there is a better name for this, but I still can't think
of one.
Bye
Sven
Index: Completion/Core/_expand
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/_expand,v
retrieving revision 1.21
diff -u -r1.21 _expand
--- Completion/Core/_expand 2000/06/29 06:59:00 1.21
+++ Completion/Core/_expand 2000/06/29 07:08:49
@@ -36,7 +36,7 @@
[[ "$word" = *\$\{[^\}]# ]] && return 1
zstyle -T ":completion:${curcontext}:" suffix &&
- [[ "$word" = (\~*/*|\$[a-zA-Z0-9_\[\]]##[^a-zA-Z0-9_\[\]]*|\$\{*\}?*) ]] &&
+ [[ "$word" = (\~*/|\$(|[=~#^+])[a-zA-Z0-9_\[\]]##[^a-zA-Z0-9_\[\]]|\$\{*\}?)[^\$\{\}\(\)\<\>?^*#~]# ]] &&
return 1
zstyle -t ":completion:${curcontext}:" accept-exact ||
Index: Doc/Zsh/compsys.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/compsys.yo,v
retrieving revision 1.78
diff -u -r1.78 compsys.yo
--- Doc/Zsh/compsys.yo 2000/06/29 07:04:17 1.78
+++ Doc/Zsh/compsys.yo 2000/06/29 07:08:50
@@ -1888,7 +1888,8 @@
tilde or parameter expansion. If it is set to `true', the word will
only be expanded if it doesn't have a suffix, i.e. if it is something
like `tt(~foo)' or `tt($foo)', but not if it is `tt(~foo/)' or
-`tt($foo/bar)'. The default for this style is `true'.
+`tt($foo/bar)', unless that suffix itself contains characters eligible
+for expansion. The default for this style is `true'.
)
kindex(tag-order, completion style)
item(tt(tag-order))(
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~2000-06-29 7:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-06-29 7:09 Sven Wischnowsky [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-06-26 9:34 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=200006290709.JAA04198@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).