Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: compinstall and non-default file
- X-seq: zsh-workers 11013
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx (Zsh hackers list)
- Subject: Re: compinstall and non-default file
- Date: Fri, 28 Apr 2000 18:36:03 +0100
- In-reply-to: "Your message of Fri, 28 Apr 2000 10:21:55 BST." <0FTP00F9WZCJ5M@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
> > With the following file generated by compinstall it cannot find it's
> > definition. I'd expected it to parse the file.
>
> Yes, this was just plain stupidity. Even if it had registered that you'd
> edited it, it would have tried to search the name before you edited it.
> I've put in a test that the file you give does have definitions in it.
There was a problem with this. Unless you actually had an alternative
file with completions in it, you were stuck in the loop for ever.
I've added compcontext=-default-, but for some reason I'm getting too many
completions; file completions appear, but above is something else without
descriptions which contains some subset of file completions in a way I
haven't understood.
Index: Completion/Core/compinstall
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/compinstall,v
retrieving revision 1.9
diff -u -r1.9 compinstall
--- Completion/Core/compinstall 2000/04/28 09:31:54 1.9
+++ Completion/Core/compinstall 2000/04/28 17:34:31
@@ -2,6 +2,7 @@
setopt extendedglob
local key
+local compcontext=-default-
__ci_tidyup() {
unfunction -m __ci_\* 2>/dev/null
@@ -70,7 +71,7 @@
are exactly the form in which compinstall inserted them. If you leave
the line as it is, or empty, I won't search."
while true; do
- vared -ch -p 'file> ' newifile
+ vared -ch -p 'file> ' newifile || break
if [[ -n $newifile && $ifile != $newifile ]]; then
if __ci_test_ifile $newifile; then
foundold=true
@@ -78,6 +79,8 @@
fi
print "I couldn't find any definitions there. Edit a new filename, or
leave the line blank to ignore it."
+ else
+ break
fi
done
fi
--
Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxxx>
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author