about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-03-23 12:44:21 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-03-23 12:44:21 +0000
commit9ef6eed52a5cdba96bb95711eadd71d21bd81388 (patch)
tree425b90323308520728280b3a844f262255031a4b /Completion
parenta78c8b50a05efc0bc8b4cded184099b962ea6bbc (diff)
downloadzsh-9ef6eed52a5cdba96bb95711eadd71d21bd81388.tar.gz
zsh-9ef6eed52a5cdba96bb95711eadd71d21bd81388.tar.xz
zsh-9ef6eed52a5cdba96bb95711eadd71d21bd81388.zip
add commands and call-command styles; mention some of the more expensive things about completion setup in the docs (13727)
Diffstat (limited to 'Completion')
-rwxr-xr-xCompletion/User/_init_d3
-rw-r--r--Completion/User/_make3
2 files changed, 4 insertions, 2 deletions
diff --git a/Completion/User/_init_d b/Completion/User/_init_d
index 93065cd80..280b0a9af 100755
--- a/Completion/User/_init_d
+++ b/Completion/User/_init_d
@@ -17,6 +17,7 @@ read -u0k 2 magic < $words[1] && [[ $magic = '#!' ]] &&
 #
 #    cmds=( ${${(j:|:s:|:)${(M)${(f)"$(< $words[1])"}:#[[:blank:]]#(\'|)[a-z_|]##(\'|)\)}}//[^a-z_]} )
 
-(( $#cmds )) || cmds=(start stop)
+(( $#cmds )) || zstyle -a ":completion:${curcontext}:commands" commands cmds ||
+    cmds=(start stop)
 
 _sub_commands $cmds
diff --git a/Completion/User/_make b/Completion/User/_make
index 958e2a5af..7c7bbdae3 100644
--- a/Completion/User/_make
+++ b/Completion/User/_make
@@ -32,7 +32,8 @@ else
   fi
 
   if [[ -n "$file" ]] && _tags targets; then
-    if [[ -n "$_is_gnu[$words[1]]" ]]; then
+    if [[ -n "$_is_gnu[$words[1]]" ]] &&
+       zstyle -t ":completion:${curcontext}:targets" call-command; then
       tmp=( $(_call targets "$words[1]" -nsp --no-print-directory -f "$file" .PHONY 2> /dev/null | awk '/^[a-zA-Z0-9][^\/\t=]+:/ {print $1}' FS=:) )
     else
       tmp=(