zsh-workers
 help / color / mirror / code / Atom feed
* Re: Bug#463507: zsh: Completion fails with: "_main_complete:161: permission denied:"
       [not found]                 ` <20080205024651.ea4026a1.agcosta@gis.net>
@ 2008-02-05 14:19                   ` Clint Adams
  2008-02-05 14:41                     ` Peter Stephenson
  0 siblings, 1 reply; 5+ messages in thread
From: Clint Adams @ 2008-02-05 14:19 UTC (permalink / raw)
  To: agcosta, 463507; +Cc: zsh-workers

On Tue, Feb 05, 2008 at 02:46:51AM -0500, A. Costa wrote:
> 'zsh-newuser-install' gave me:
> 
> 	% zstyle -L | grep completer
> 	zstyle ':completion:*' completer ''

I think maybe it should prevent that from ever happening.

You probably want

zstyle ':completion:*' completer _complete

at the VERY minimum.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug#463507: zsh: Completion fails with: "_main_complete:161: permission denied:"
  2008-02-05 14:19                   ` Bug#463507: zsh: Completion fails with: "_main_complete:161: permission denied:" Clint Adams
@ 2008-02-05 14:41                     ` Peter Stephenson
  2008-02-05 14:50                       ` Peter Stephenson
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Stephenson @ 2008-02-05 14:41 UTC (permalink / raw)
  To: agcosta, 463507, zsh-workers

Clint Adams wrote:
> On Tue, Feb 05, 2008 at 02:46:51AM -0500, A. Costa wrote:
> > 'zsh-newuser-install' gave me:
> >
> > 	% zstyle -L | grep completer
> > 	zstyle ':completion:*' completer ''
>
> I think maybe it should prevent that from ever happening.
>
> You probably want
>
> zstyle ':completion:*' completer _complete

I presume the problem is that it's not set by default, rather than that
the user explicitly unset the completions?  I think this should fix it.

Index: Completion/compinstall
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/compinstall,v
retrieving revision 1.10
diff -u -r1.10 compinstall
--- Completion/compinstall	21 Aug 2006 19:40:34 -0000	1.10
+++ Completion/compinstall	5 Feb 2008 14:38:01 -0000
@@ -506,7 +506,7 @@
 		      ;;
 		[sS]) olist=
 		      tmparr=(_complete _approximate _correct _match _expand)
-		      while true; do
+		      while true; do
 			clear
 			print "\
      *** compinstall:  choosing completers to have _oldlist behaviour ***
@@ -839,7 +839,10 @@
   for c in ${=newc}; do
     completers[$c]=1
   done
-  clist=(_list _oldlist _menu _expand _complete _ignored
+  if (( ${#completers} == 0 )); then
+    completers[_complete]=1
+  fi
+  clist=(_list _oldlist _menu _expand _complete _ignored
          _match _correct _approximate _prefix)

   # TODO: these are a bit brief, so could provide some more detailed help.

--
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug#463507: zsh: Completion fails with: "_main_complete:161: permission denied:"
  2008-02-05 14:41                     ` Peter Stephenson
@ 2008-02-05 14:50                       ` Peter Stephenson
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Stephenson @ 2008-02-05 14:50 UTC (permalink / raw)
  To: agcosta, 463507, zsh-workers

Peter Stephenson wrote:
> +  if (( ${#completers} == 0 )); then
> +    completers[_complete]=1
> +  fi

Come to think of it, the default should almost certainly be the same as
what the completion system uses if the style isn't set, i.e. with
_ignored, too.  I'll commit it with that added.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug#463507: Need more info. (zsh: Completion fails with: "_main_complete:161: permission denied:")
       [not found]         ` <20090102180327.885ec1ea.agcosta@gis.net>
@ 2009-01-02 23:58           ` Clint Adams
  2009-01-03  0:45             ` Richard Hartmann
  0 siblings, 1 reply; 5+ messages in thread
From: Clint Adams @ 2009-01-02 23:58 UTC (permalink / raw)
  To: agcosta, 463507; +Cc: Richard Hartmann, zsh-workers

On Fri, Jan 02, 2009 at 06:03:27PM -0500, A. Costa wrote:
> Restarting as regular 'zsh' the bug comes back... so, assuming there's
> now enough data to answer: is this a 'zsh' bug, or was and is my
> config somehow borked?  If my config is borked, what's the right way to

Well, possibly both.  All we've established thus far is that something
in your config is consistently triggering something unexpected.

Try ls -<Ctrl-X>? (that is, hit whatever's bound to _complete_debug
at the point you would normally trigger the error with TAB) and
send the resulting debug output in /tmp to the bug report.

> make this fix permanent & default?
> 
> BTW: I notice the 'zsh' switch completion seems more thorough than that
> of 'bash'.  'bash' only does a '--' (double hyphen) completion, but
> 'zsh' does single and double hyphens.  The 'fish' shell has completion
> powers comparable to 'zsh'.
> 
> Another observation, maybe different bug.  With the above fix, if I do:
> 
> 	ls --n<TAB>
> 
> 'zsh' auto-completes this as:
> 
> 	ls --n-g
> 
> ...which does not currently seem to be an 'ls' option.  Hitting <TAB> a
> second time auto-completes as:
> 
> 	ls --no-group
> 
> ...which is a proper 'ls' option.  Bug, or maybe some legacy 'ls' option?

I think that's a bug.. it should be offering you --no-group and
--numeric-uid-gid until you disambiguate.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug#463507: Need more info. (zsh: Completion fails with: "_main_complete:161: permission denied:")
  2009-01-02 23:58           ` Bug#463507: Need more info. (zsh: Completion fails with: "_main_complete:161: permission denied:") Clint Adams
@ 2009-01-03  0:45             ` Richard Hartmann
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Hartmann @ 2009-01-03  0:45 UTC (permalink / raw)
  To: agcosta, 463507, Richard Hartmann, zsh-workers

On Sat, Jan 3, 2009 at 00:58, Clint Adams <schizo@debian.org> wrote:

> I think that's a bug.. it should be offering you --no-group and
> --numeric-uid-gid until you disambiguate.

That is a bug, but I have no idea where that comes from..


Richard


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-01-03  0:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <2d460de70812291522pd0bbfe5odaeef95e508b1e29@mail.gmail.com>
     [not found] ` <20080131221535.c1aa6f7c.agcosta@gis.net>
     [not found]   ` <20080201133818.GA28192@scowler.net>
     [not found]     ` <20080201173143.2a7ec474.agcosta@gis.net>
     [not found]       ` <20080202030920.GA2099@scowler.net>
     [not found]         ` <20080202014728.9aeb3310.agcosta@gis.net>
     [not found]           ` <20080202184123.GA20032@scowler.net>
     [not found]             ` <20080203004905.a85d2c3c.agcosta@gis.net>
     [not found]               ` <20080205033050.GA4729@scowler.net>
     [not found]                 ` <20080205024651.ea4026a1.agcosta@gis.net>
2008-02-05 14:19                   ` Bug#463507: zsh: Completion fails with: "_main_complete:161: permission denied:" Clint Adams
2008-02-05 14:41                     ` Peter Stephenson
2008-02-05 14:50                       ` Peter Stephenson
     [not found]   ` <handler.463507.D463507.123059292812775.notifdone@bugs.debian.org>
     [not found]     ` <20090102152635.052adb13.agcosta@gis.net>
     [not found]       ` <20090102215544.GC8949@scru.org>
     [not found]         ` <20090102180327.885ec1ea.agcosta@gis.net>
2009-01-02 23:58           ` Bug#463507: Need more info. (zsh: Completion fails with: "_main_complete:161: permission denied:") Clint Adams
2009-01-03  0:45             ` Richard Hartmann

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).