zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@sunsite.dk
Cc: Sykora <sykora.skywave@gmail.com>, 482662@bugs.debian.org
Subject: Re: Bug#482662: zsh: completion with locate gives extra output
Date: Sun, 25 May 2008 15:52:31 +0100	[thread overview]
Message-ID: <20080525155231.691a4979@pws-pc> (raw)
In-Reply-To: <20080524202135.GA18082@scru.org>

On Sat, 24 May 2008 20:21:35 +0000
Clint Adams <schizo@debian.org> wrote:
> On Sat, May 24, 2008 at 10:16:56PM +0530, Sykora wrote:
> > I just typed "locate" at the prompt and pressed space, followed by tab. 
> > 
> > 
> > $> locate Usage: locate [-d path | --database=path] [-e | -E | --[non-]existing]
> >       [-i | --ignore-case] [-w | --wholename] [-b | --basename] 
> >       [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]
> >       [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --stdio ]
> >       [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]
> >       [--max-database-age D] [--version] [--help]
> >       pattern...
> > 
> > Report bugs to <bug-findutils@gnu.org>.
> > <CURSOR HERE>
> 
> Ah, okay. You are using GNU locate and I am using mlocate.
> 
> So _locate is trying to match *(#i)gnu locate*, which does not appear in the
> `locate -V` output (nor does it appear in the `locate --version` output).
> Does anyone have an older version of findutils handy? Would matching for
> *findutils* or (#i)*findutils*gnu* cover all possibilities?

Presumably also copying stderr to stdout.

Index: Completion/Unix/Command/_locate
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_locate,v
retrieving revision 1.2
diff -u -r1.2 _locate
--- Completion/Unix/Command/_locate	11 Feb 2008 16:28:30 -0000	1.2
+++ Completion/Unix/Command/_locate	25 May 2008 14:50:52 -0000
@@ -11,7 +11,7 @@
   ;;
 
   (locate)
-  input="$(_call_program locate $words[1] -V)"
+  input="$(_call_program locate $words[1] -V 2>&1)"
   case $input in
     (*mlocate*)
     ltype=mlocate
@@ -21,7 +21,7 @@
     ltype=slocate
     ;;
 
-    (*(#i)gnu locate*)
+    (*(#i)gnu locate*|*findutils*gnu*)
     ltype=gnu
     ;;
 

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


  reply	other threads:[~2008-05-25 14:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080524095358.26811.79795.reportbug@nexus>
     [not found] ` <20080524135404.GA9888@scru.org>
     [not found]   ` <20080524164656.GA2682@nexus>
2008-05-24 20:21     ` Clint Adams
2008-05-25 14:52       ` Peter Stephenson [this message]
2008-05-26 10:14         ` Jun T.
2008-05-26 13:39           ` Peter Stephenson

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=20080525155231.691a4979@pws-pc \
    --to=p.w.stephenson@ntlworld.com \
    --cc=482662@bugs.debian.org \
    --cc=sykora.skywave@gmail.com \
    --cc=zsh-workers@sunsite.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).