From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24553 invoked from network); 13 Apr 2004 16:08:09 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 13 Apr 2004 16:08:09 -0000 Received: (qmail 14672 invoked by alias); 13 Apr 2004 16:08:04 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19768 Received: (qmail 14650 invoked from network); 13 Apr 2004 16:08:03 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 13 Apr 2004 16:08:03 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [130.225.247.86] by sunsite.dk (MessageWall 1.0.8) with SMTP; 13 Apr 2004 16:8:3 -0000 Received: (qmail 19960 invoked from network); 13 Apr 2004 16:08:03 -0000 Received: from mail36.messagelabs.com (193.109.254.211) by a.mx.sunsite.dk with SMTP; 13 Apr 2004 16:08:01 -0000 X-VirusChecked: Checked X-Env-Sender: okiddle@yahoo.co.uk X-Msg-Ref: server-4.tower-36.messagelabs.com!1081872454!5397764 X-StarScan-Version: 5.2.10; banners=-,-,- X-Originating-IP: [158.234.9.163] Received: (qmail 27296 invoked from network); 13 Apr 2004 16:07:34 -0000 Received: from iris.logica.co.uk (158.234.9.163) by server-4.tower-36.messagelabs.com with SMTP; 13 Apr 2004 16:07:34 -0000 Received: from trentino.logica.co.uk ([158.234.142.61]) by iris.logica.co.uk (8.12.3/8.12.3/Debian -4) with ESMTP id i3DG7XMO018723 for ; Tue, 13 Apr 2004 17:07:33 +0100 Received: from trentino.logica.co.uk (localhost [127.0.0.1]) by trentino.logica.co.uk (Postfix) with ESMTP id 0CFCC790E26C for ; Tue, 13 Apr 2004 18:06:49 +0200 (CEST) X-VirusChecked: Checked X-StarScan-Version: 5.1.13; banners=.,-,- From: Oliver Kiddle To: Zsh workers Subject: PATCH: Insecure directories warning - add clue Date: Tue, 13 Apr 2004 18:06:48 +0200 Message-ID: <18493.1081872408@trentino.logica.co.uk> X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.3 required=6.0 tests=OPT_IN_CAPS autolearn=no version=2.63 X-Spam-Hits: 0.3 This is a patch to compinit so that it suggests running compaudit to see the list of files deemed insecure when running compinit. This is suggested in a report on the sourceforge tracker. I've also made compinit print error messages on stderr instead of stdout. Oliver Index: Completion/compinit =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/compinit,v retrieving revision 1.9 diff -u -r1.9 compinit --- Completion/compinit 25 Apr 2002 15:35:37 -0000 1.9 +++ Completion/compinit 13 Apr 2004 15:48:10 -0000 @@ -223,7 +223,7 @@ # Get the options. if (( ! $# )); then - echo "$0: I need arguments" + echo "$0: I need arguments" >&2 return 1 fi @@ -234,7 +234,7 @@ [pPkK]) if [[ -n "$type" ]]; then # Error if both `-p' and `-k' are given (or one of them # twice). - echo "$0: type already set to $type" + echo "$0: type already set to $type" >&2 return 1 fi if [[ "$opt" = p ]]; then @@ -253,7 +253,7 @@ shift OPTIND-1 if (( ! $# )); then - echo "$0: I need arguments" + echo "$0: I need arguments" >&2 return 1 fi @@ -275,11 +275,11 @@ _comps[$cmd]="$func" _services[$cmd]="$svc" else - echo "$0: unknown command or service: $svc" + echo "$0: unknown command or service: $svc" >&2 ret=1 fi else - echo "$0: invalid argument: $1" + echo "$0: invalid argument: $1" >&2 ret=1 fi shift @@ -299,7 +299,7 @@ widgetkey) while [[ -n $1 ]]; do if [[ $# -lt 3 ]]; then - echo "$0: compdef -K requires " + echo "$0: compdef -K requires " >&2 return 1 fi [[ $1 = _* ]] || 1="_$1" @@ -317,7 +317,7 @@ ;; key) if [[ $# -lt 2 ]]; then - echo "$0: missing keys" + echo "$0: missing keys" >&2 return 1 fi @@ -390,7 +390,7 @@ key) # Oops, cannot do that yet. - echo "$0: cannot restore key bindings" + echo "$0: cannot restore key bindings" >&2 return 1 ;; *) @@ -413,7 +413,8 @@ if [[ -n "$_i_q" ]]; then if [[ "$_i_fail" = ask ]]; then if ! read -q "?Ignore insecure $_i_q and continue [ny]? "; then - echo "$0: initialization aborted" + echo "run compaudit to see list of insecure $_i_q" >&2 + echo "$0: initialization aborted" >&2 unfunction compinit compdef unset _comp_dumpfile _comp_secure compprefuncs comppostfuncs \ _comps _patcomps _postpatcomps _compautos _lastcomp