From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: misc. completion stuff
Date: Mon, 27 Mar 2000 10:52:23 +0200 (MET DST) [thread overview]
Message-ID: <200003270852.KAA03376@beta.informatik.hu-berlin.de> (raw)
This...
- improves completion for the tag-order and file-patterns styles
- adds the docs and _zstyle handling for the subst-glob-only style
- makes the _approximate version of compadd slightly faster
Bye
Sven
diff -ru ../z.old/Completion/Builtins/_zstyle Completion/Builtins/_zstyle
--- ../z.old/Completion/Builtins/_zstyle Mon Mar 27 10:50:05 2000
+++ Completion/Builtins/_zstyle Mon Mar 27 10:51:19 2000
@@ -21,7 +21,7 @@
disable-stat c:bool
domains c:
expand c:
- file-patterns c:
+ file-patterns c:filepat
format c:
glob c:
group-name c:
@@ -55,12 +55,13 @@
remove-all-dups c:bool
single-ignored c:single-ignored
sort c:bool
- tag-aliases c:tag
- tag-order c:tag
special-dirs c:sdirs
squeeze-slashes c:bool
stop c:stop
+ subst-glob-only c:
substitute c:
+ tag-aliases c:tag
+ tag-order c:tag
users c:_users
users-hosts c:user-host
verbose c:bool
@@ -197,7 +198,24 @@
;;
tag)
- _wanted tags expl tag compadd - $taglist
+ compset -q
+ if compset -P '*:*:'; then
+ _message description
+ elif compset -P '*:'; then
+ _message 'tag alias'
+ else
+ _wanted tags expl tag compadd - $taglist
+ fi
+ ;;
+
+ filepat)
+ if compset -P '*:*:'; then
+ _message description
+ elif compset -P '*:'; then
+ _message tag
+ else
+ _message 'glob patterns'
+ fi
;;
user-host)
diff -ru ../z.old/Completion/Core/_approximate Completion/Core/_approximate
--- ../z.old/Completion/Core/_approximate Mon Mar 27 10:50:07 2000
+++ Completion/Core/_approximate Mon Mar 27 10:51:19 2000
@@ -46,7 +46,7 @@
# ignored prefix).
compadd() {
- [[ "$*" != *-([a-zA-Z/]#|)U* &&
+ [[ ${argv[(I)-[a-zA-Z]#U[a-zA-Z]#]} -eq 0 &&
"${#:-$PREFIX$SUFFIX}" -le _comp_correct ]] && return
if [[ "$PREFIX" = \~*/* ]]; then
diff -ru ../z.old/Doc/Zsh/compsys.yo Doc/Zsh/compsys.yo
--- ../z.old/Doc/Zsh/compsys.yo Mon Mar 27 10:49:49 2000
+++ Doc/Zsh/compsys.yo Mon Mar 27 10:51:20 2000
@@ -1380,6 +1380,15 @@
style. But all keys matching the pattern given as its value will stop
incremental completion and will then execute their usual function.
)
+item(tt(subst-globs-only))(
+This is used by the tt(_expand) completer. As for the tt(glob) style,
+the value should be a value usable in a `tt($((...)))' arithmetical
+expression. If it evaluates to `tt(1)', the expansion will only be
+used if they resulted from globbing. If only the expansions described
+for the tt(substitute) style described below resulted in expanded
+strings and globbing did not change the set of expanded strings, the
+tt(_expand) completer will do nothing.
+)
item(tt(substitute))(
If this is unset or set to the empty string, the tt(_expand) completer
will first try to expand all substitutions in the string (such as
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~2000-03-27 8:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-03-27 8:52 Sven Wischnowsky [this message]
2000-03-27 9:51 ` 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=200003270852.KAA03376@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).