* PATCH: Insecure directories warning - add clue
@ 2004-04-13 16:06 Oliver Kiddle
2004-04-13 17:14 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Oliver Kiddle @ 2004-04-13 16:06 UTC (permalink / raw)
To: Zsh workers
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 <widget> <comp-widget> <key>"
+ echo "$0: compdef -K requires <widget> <comp-widget> <key>" >&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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: PATCH: Insecure directories warning - add clue
2004-04-13 16:06 PATCH: Insecure directories warning - add clue Oliver Kiddle
@ 2004-04-13 17:14 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2004-04-13 17:14 UTC (permalink / raw)
To: Zsh workers
On Apr 13, 6:06pm, Oliver Kiddle wrote:
}
} I've also made compinit print error messages on stderr instead of
} stdout.
Just as a passing remark, I tend to prefer "print -u2" for that, rather
than >&2.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-04-13 17:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-13 16:06 PATCH: Insecure directories warning - add clue Oliver Kiddle
2004-04-13 17:14 ` Bart Schaefer
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).