* PATCH: misc. completion stuff
@ 2000-03-27 8:52 Sven Wischnowsky
2000-03-27 9:51 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Sven Wischnowsky @ 2000-03-27 8:52 UTC (permalink / raw)
To: zsh-workers
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: PATCH: misc. completion stuff
2000-03-27 8:52 PATCH: misc. completion stuff Sven Wischnowsky
@ 2000-03-27 9:51 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2000-03-27 9:51 UTC (permalink / raw)
To: zsh-workers
On Mar 27, 10:52am, Sven Wischnowsky wrote:
} Subject: PATCH: misc. completion stuff
}
} - adds the docs and _zstyle handling for the subst-glob-only style
Naturally this conflicts with 10263, too. It should be pretty obvious
how to fix it, though. Just remember to insert
kindex(subst-globs-only, completion style)
above the hunk added by 10265.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-03-27 9:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-27 8:52 PATCH: misc. completion stuff Sven Wischnowsky
2000-03-27 9:51 ` Bart Schaefer
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).