about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-11 08:22:57 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-11 08:22:57 +0000
commit2fcab2a716d2f770aa1efd0a2ee36f8b3b55d808 (patch)
tree2a279765739cf55b223cbfa1557ea385d031bb2a
parentfac3086d9782e73dcaf1aa65fd36a0b63a374719 (diff)
downloadzsh-2fcab2a716d2f770aa1efd0a2ee36f8b3b55d808.tar.gz
zsh-2fcab2a716d2f770aa1efd0a2ee36f8b3b55d808.tar.xz
zsh-2fcab2a716d2f770aa1efd0a2ee36f8b3b55d808.zip
_make uses $words[1] for command name (10635)
-rw-r--r--ChangeLog3
-rw-r--r--Completion/User/_make12
2 files changed, 9 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 22a31359c..34cc8ade1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2000-04-11  Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
 
+	* 10635: Completion/User/_make: _make uses $words[1] for command
+ 	name
+	
 	* 10632: Completion/Base/_brace_parameter, Completion/Base/_condition,
  	Completion/Base/_default, Completion/Base/_describe,
  	Completion/Base/_first, Completion/Base/_jobs,
diff --git a/Completion/User/_make b/Completion/User/_make
index 5161e6689..95152635a 100644
--- a/Completion/User/_make
+++ b/Completion/User/_make
@@ -4,12 +4,12 @@ local prev="$words[CURRENT-1]" file expl tmp
 
 (( $+_is_gnu )) || typeset -gA _is_gnu
 
-if (( ! $+_is_gnu[$1] )); then
-  if [[ $(_call version $1 -v -f /dev/null </dev/null 2>/dev/null) = *GNU* ]]
+if (( ! $+_is_gnu[$words[1]] )); then
+  if [[ $(_call version $words[1] -v -f /dev/null </dev/null 2>/dev/null) = *GNU* ]]
   then
-    _is_gnu[$1]=yes
+    _is_gnu[$words[1]]=yes
   else
-    _is_gnu[$1]=
+    _is_gnu[$words[1]]=
   fi
 fi
 
@@ -31,7 +31,7 @@ else
     file=''
   fi
 
-  if [[ -n "$file" ]] && _wanted targets; then
+  if [[ -n "$file" ]] && _tags targets; then
     if [[ -n "$_is_gnu[$1]" ]]; then
       tmp=( $(make -nsp --no-print-directory -f "$file" .PHONY | awk '/^[a-zA-Z0-9][^\/\t=]+:/ {print $1}' FS=:) )
     else
@@ -42,7 +42,7 @@ else
  	     FS=: $file)
            )
     fi
-    _all_labels targets expl 'make target' compadd "$tmp[@]" && return 0
+    _wanted targets expl 'make target' compadd "$tmp[@]" && return 0
   fi
   compset -P 1 '*='
   _files