* Re: compinstall and non-default file
@ 2000-05-02 8:38 Sven Wischnowsky
0 siblings, 0 replies; 4+ messages in thread
From: Sven Wischnowsky @ 2000-05-02 8:38 UTC (permalink / raw)
To: zsh-workers
Peter Stephenson wrote:
> > > 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.
Hm, I can't reproduce this. Could you give me an example?
Bye
Sven
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: compinstall and non-default file
2000-04-28 9:21 ` Peter Stephenson
@ 2000-04-28 17:36 ` Peter Stephenson
0 siblings, 0 replies; 4+ messages in thread
From: Peter Stephenson @ 2000-04-28 17:36 UTC (permalink / raw)
To: Zsh hackers list
> > 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@cambridgesiliconradio.com>
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: compinstall and non-default file
2000-04-28 8:26 Andrej Borsenkow
@ 2000-04-28 9:21 ` Peter Stephenson
2000-04-28 17:36 ` Peter Stephenson
0 siblings, 1 reply; 4+ messages in thread
From: Peter Stephenson @ 2000-04-28 9:21 UTC (permalink / raw)
To: Zsh hackers list
> 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.
Index: Completion/Core/compinstall
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/compinstall,v
retrieving revision 1.8
diff -u -r1.8 compinstall
--- Completion/Core/compinstall 2000/04/27 20:44:48 1.8
+++ Completion/Core/compinstall 2000/04/28 09:20:03
@@ -69,9 +69,19 @@
file where these can be found. Note that this will only work if they
are exactly the form in which compinstall inserted them. If you leave
the line as it is, or empty, I won't search."
- vared -ch -p 'file> ' newifile
- [[ -z $newifile || $ifile = $newifile ]] && foundold=false
+ while true; do
+ vared -ch -p 'file> ' newifile
+ if [[ -n $newifile && $ifile != $newifile ]]; then
+ if __ci_test_ifile $newifile; then
+ foundold=true
+ break
+ fi
+ print "I couldn't find any definitions there. Edit a new filename, or
+leave the line blank to ignore it."
+ fi
+ done
fi
+ifile=$newifile
if [[ $foundold = true ]]; then
sed -n "/^[ ]*$startline/,/^[ ]*$endline/p" $ifile |
--
Peter Stephenson <pws@cambridgesiliconradio.com>
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070
^ permalink raw reply [flat|nested] 4+ messages in thread
* compinstall and non-default file
@ 2000-04-28 8:26 Andrej Borsenkow
2000-04-28 9:21 ` Peter Stephenson
0 siblings, 1 reply; 4+ messages in thread
From: Andrej Borsenkow @ 2000-04-28 8:26 UTC (permalink / raw)
To: ZSH workers mailing list
With the following file generated by compinstall it cannot find it's
definition. I'd expected it to parse the file.
bor@itsrm2% cat ~/.zcompletion
# The following lines were added by compinstall
autoload -U compinit
compinit
zstyle ':completion:*' completer _oldlist _complete _match
zstyle ':completion:*' format 'Completing %d'
zstyle ':completion:*' group-name ''
zstyle ':completion:*' ignore-parents parent pwd
zstyle ':completion:*' insert-unambiguous true
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' list-prompt 'Showing %l'
zstyle ':completion:*' match-original both
zstyle ':completion:*' menu select=0
zstyle ':completion:*' original true
zstyle ':completion:*' verbose true
# End of lines added by compinstall
zstyle ':completion:*' old-list _match
# _configure tuning
zstyle ':completion:*:*:configure:*' tag-order \
'options:-with:with\ options options:-other:other\ options' \
'options:-without:without\ options'
zstyle ':completion:*:options-with' ignored-patterns '^--with-*'
zstyle ':completion:*:options-without' ignored-patterns '^--without-*'
zstyle ':completion:*:options-other' ignored-patterns '--with(|out)-*'
# end of configure tuning
bor@itsrm2% compinstall
I haven't found any existing completion definitions.
If you have some already defined by compinstall, edit the name of the
file where these can be found. Note that this will only work if they
are exactly the form in which compinstall inserted them. If you leave
the line as it is, or empty, I won't search.
file> /home/bor/.zcompletion
Starting a new completion configuration from scratch.
This will be appended to the file /home/bor/.zshrc. It is up to you to
ensure
that these lines are actually executed. They will not be if your .zshrc
usually returns before the end.
Note that you will be given a chance to save the new setup
somewhere else at the end.
-andrej
Have a nice DOS!
B >>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2000-05-02 8:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-02 8:38 compinstall and non-default file Sven Wischnowsky
-- strict thread matches above, loose matches on Subject: below --
2000-04-28 8:26 Andrej Borsenkow
2000-04-28 9:21 ` Peter Stephenson
2000-04-28 17:36 ` Peter Stephenson
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).