Your message dated Thu, 09 Feb 2006 07:17:14 -0800
with message-id <[EMAIL PROTECTED]>
and subject line Bug#340065: fixed in zsh 4.3.0-dev-3-2
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: zsh
Version: 4.2.5-22
Severity: wishlist
Tags: patch

make completion currently doesn't use -C arguments passed on the
current command line to decide the completion of -[CfoW] as well as
to choose the Makefile to use for getting the targets. This patch
incorporates this behaviour.



--- _make.orig  2005-11-20 00:40:19.000000000 +0530
+++ _make       2005-11-20 01:01:10.000000000 +0530
@@ -92,6 +92,28 @@
     done
 }
 
+findBasedir () {
+  local file index basedir
+  basedir=$PWD
+  for ((index=0; index<$#@; index++)); do
+    if [[ [EMAIL PROTECTED] = -C ]]; then
+      [EMAIL PROTECTED];
+      if [[ -z $file ]]; then
+       # make returns with an error if an empty arg is given
+       # even if the concatenated path is a valid directory
+       return
+      elif [[ $file = /* ]]; then
+       # Absolute path, replace base directory
+       basedir=$file
+      else
+       # Relative, concatenate path
+       basedir=$basedir/$file
+      fi
+    fi
+  done
+  print -- $basedir
+}
+
 _pick_variant -r is_gnu gnu=GNU unix -v -f
 
 if [[ $is_gnu = gnu ]]; then
@@ -100,21 +122,27 @@
     incl=.include
 fi
 if [[ "$prev" = -[CI] ]]; then
-  _files -/
+  _files -W ${(q)$(findBasedir ${words[1,CURRENT-1]})} -/
 elif [[ "$prev" = -[foW] ]]; then
-  _files
+  _files -W ${(q)$(findBasedir $words)}
 else
   file="$words[(I)-f]"
   if (( file )); then
-    file="$words[file+1]"
-  elif [[ -e Makefile ]]; then
-    file=Makefile
-  elif [[ -e makefile ]]; then
-    file=makefile
-  elif [[ $is_gnu = gnu && -e GNUmakefile ]]; then
-    file=GNUmakefile
+    file=${~words[file+1]}
+    [[ $file = [^/]* ]] && file=${(q)$(findBasedir $words)}/$file
+    [[ -r $file ]] || file=
   else
-    file=''
+    local basedir
+    basedir=${(q)$(findBasedir $words)}
+    if [[ $is_gnu = gnu && -r $basedir/GNUmakefile ]]; then
+      file=$basedir/GNUmakefile
+    elif [[ -r $basedir/makefile ]]; then
+      file=$basedir/makefile
+    elif [[ -r $basedir/Makefile ]]; then
+      file=$basedir/Makefile
+    else
+      file=''
+    fi
   fi
 
   if [[ -n "$file" ]] && _tags targets; then
 
Since I am new to zsh scripting, I am unsure of the completion
policy while dealing with the values of arguments passed when
deciding the completion. Currently I only use the ${~word} to
evaluate the argument to -C. Is it considered safe to expand
constructs like .. -C $(ls) ... ? I thought I could atleast expand
constructs like .. -C ~/* .. by using files=(${~word}), followed by
using file=$file[1], but I end up with an error for $() constructs
(numeric argument expected). It would be good if someone could
indicate the cause of this error, and whether it is conventional to
expand globs to use it for further completion.

Regards,
Ramkumar.

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (101, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.14-archck1
Locale: LANG=en_IN, LC_CTYPE=en_IN (charmap=UTF-8)

Versions of packages zsh depends on:
ii  debconf [debconf-2.0]         1.4.58     Debian configuration management sy
ii  libc6                         2.3.5-6    GNU C Library: Shared libraries an
ii  libncurses5                   5.4-9      Shared libraries for terminal hand

Versions of packages zsh recommends:
ii  libcap1                       1:1.10-14  support for getting/setting POSIX.
ii  libpcre3                      6.4-1.0.1  Perl 5 Compatible Regular Expressi

-- no debconf information 

-- 
WARN_(accel)("msg null; should hang here to be win compatible\n");
                                   -- WINE source code

--- End Message ---
--- Begin Message ---
Source: zsh
Source-Version: 4.3.0-dev-3-2

We believe that the bug you reported is fixed in the latest version of
zsh, which is due to be installed in the Debian FTP archive:

zsh-doc_4.3.0-dev-3-2_all.deb
  to pool/main/z/zsh/zsh-doc_4.3.0-dev-3-2_all.deb
zsh-static_4.3.0-dev-3-2_sparc.deb
  to pool/main/z/zsh/zsh-static_4.3.0-dev-3-2_sparc.deb
zsh_4.3.0-dev-3-2.diff.gz
  to pool/main/z/zsh/zsh_4.3.0-dev-3-2.diff.gz
zsh_4.3.0-dev-3-2.dsc
  to pool/main/z/zsh/zsh_4.3.0-dev-3-2.dsc
zsh_4.3.0-dev-3-2_sparc.deb
  to pool/main/z/zsh/zsh_4.3.0-dev-3-2_sparc.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Clint Adams <[EMAIL PROTECTED]> (supplier of updated zsh package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Thu,  9 Feb 2006 09:40:08 -0500
Source: zsh
Binary: zsh zsh-static zsh-doc
Architecture: source sparc all
Version: 4.3.0-dev-3-2
Distribution: unstable
Urgency: low
Maintainer: Clint Adams <[EMAIL PROTECTED]>
Changed-By: Clint Adams <[EMAIL PROTECTED]>
Description: 
 zsh        - A shell with lots of features
 zsh-doc    - zsh documentation - info/HTML format
 zsh-static - A shell with lots of features (static link)
Closes: 340065 351661
Changes: 
 zsh (4.3.0-dev-3-2) unstable; urgency=low
 .
   * Readd completion for ping, which had gone missing.
     closes: #351661.
   * Use -C arguments to make for completion.  Patch from
     R.Ramkumar.  closes: #340065.
Files: 
 10dcd943df57714b55e99c959e651343 708 shells optional zsh_4.3.0-dev-3-2.dsc
 02dcbc762eacadde1281b37535fa63be 361846 shells optional 
zsh_4.3.0-dev-3-2.diff.gz
 c2b5e4557a74d00478c2b7eeaddd1a55 699162 shells optional 
zsh-doc_4.3.0-dev-3-2_all.deb
 8d2a9a6095b0689694330200ac1b3fc5 2214484 shells optional 
zsh_4.3.0-dev-3-2_sparc.deb
 d6d2d00ecc7f5fedc62a563dc62c42e7 804094 shells optional 
zsh-static_4.3.0-dev-3-2_sparc.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Debian!

iD8DBQFD61sN5m0u66uWM3ARAluXAJ9kQMI/UFzb442ZA24fwl0lR5H+vACg3zQS
JsgLWKQI/u6XKoMLlkjxiuU=
=JRwZ
-----END PGP SIGNATURE-----


--- End Message ---

Reply via email to