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

Re: compinit quirk



On Apr 6, 10:29am, Sven Wischnowsky wrote:
} 
} Quoting the docs:
} 
}   For security reasons tt(compinit) also checks if the completion system
}   would use files not owned by root or by the current user, or files in
}   directories that are world- or group-writable or that are not owned by 
}   root or by the current user.  If such files or directories are found,
}   tt(compinit) will ask if the completion system should really be used.

Aha!  So it's the question that's misleading.  When I'm asked:

    There are insecure directories, use them anyway [ny]? 

"Use *them* anyway" means, to me, "include the insecure directories among
those searched by the completion system for functions."  What the question
is actually asking is:

    Ignore insecure directories and continue [ny]?

So let's actually say that.

Index: Completion/compinit
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/compinit,v
retrieving revision 1.2
diff -u -r1.2 compinit
--- Completion/compinit	2001/04/02 13:04:04	1.2
+++ Completion/compinit	2001/04/06 14:21:38
@@ -387,7 +387,8 @@
   if ! eval compaudit; then
     if [[ -n "$_i_q" ]]; then
       if [[ "$_i_fail" = ask ]]; then
-        if ! read -q "?There are insecure $_i_q, use them anyway [ny]? "; then
+        if ! read -q "?Ignore insecure $_i_q and continue [ny]? "; then
+	  echo "$0: initialization aborted"
           unfunction compinit compdef
           unset _comp_dumpfile _comp_secure compprefuncs comppostfuncs \
                 _comps _patcomps _postpatcomps _compautos _lastcomp

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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