Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug#463507: zsh: Completion fails with: "_main_complete:161: permission denied:"



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@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



Messages sorted by: Reverse Date, Date, Thread, Author