* Re: Odd autoremoveslash behaviour
@ 2000-05-16 8:03 Sven Wischnowsky
2000-05-16 10:59 ` Peter Stephenson
0 siblings, 1 reply; 4+ messages in thread
From: Sven Wischnowsky @ 2000-05-16 8:03 UTC (permalink / raw)
To: zsh-workers
Peter Stephenson wrote:
> I don't think this is anything I've done... it may be only with menu
> completion:
>
> % echo <TAB>
> % echo dir1/
> dir1/ dir2/
>
> type `/':
>
> % echo /
> ^gorn.
(Hey, super woody word...)
Oops. That was a more general problem, caused by the ^G-change, it
didn't accept the currently inserted match when a normal character was
pressed (and the undid it).
One question is if typing a character should make it be inserted
directly after the match (as in menucompletion) or if it should first
really accept the match as in a completion with only one match. After
very little testing I decided to make it be really accepted, but that
can be changed if our menu-completion experts say that we should...
Bye
Sven
Index: Src/Zle/complist.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/complist.c,v
retrieving revision 1.15
diff -u -r1.15 complist.c
--- Src/Zle/complist.c 2000/05/11 08:40:11 1.15
+++ Src/Zle/complist.c 2000/05/16 08:02:46
@@ -2112,6 +2112,7 @@
continue;
} else {
ungetkeycmd();
+ acc = 1;
break;
}
do_single(**p);
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Odd autoremoveslash behaviour
2000-05-16 8:03 Odd autoremoveslash behaviour Sven Wischnowsky
@ 2000-05-16 10:59 ` Peter Stephenson
0 siblings, 0 replies; 4+ messages in thread
From: Peter Stephenson @ 2000-05-16 10:59 UTC (permalink / raw)
To: Zsh hackers list
Sven wrote:
> > % echo /
> > ^gorn.
>
> (Hey, super woody word...)
It's quite olde englishe. There's a song by Flanders and Swann to the tune
of the rondo to Mozart's fourth horn concerto with the words (to the slow,
minor key episode in the middle) `Lost that horn... Found that
horn... Gorn'.
The removeslash behaviour now works. I had a play round with menu
selection and found if you try and turn it off by setting the menu style,
it doesn't work because _main_complete doesn't unset MENUSELECT unless
explicitly told to. Is there any reason not to make that local in
_main_complete?
Further, setting the style to select=long does set MENUSELECT correctly,
but unless I've misunderstood doesn't seem to have the effect that menu
selection is only started for lists longer than a page.
The following simple function, zse (Z style edit) makes it easy to edit
styles on the fly; it's sort of zed-like. Any interest in including it?
Having argued for vared to behave as if you were editing the parameter
value, I now find I need to make it behave as if you had a full command
line, since you do. How do I do that with compcontext?
# Edit shell styles as `zstyle' command lines. Lines are evaluated as
# ordinary shell code. The altered styles are not saved.
#
# With arguments, edit the existing styles for any style names matching
# the patterns given (quote to protect from filename generation).
# With no arguments, edit all styles.
#
# Example:
# zse menu list-prompt
# allows you to edit any existing zstyle lines for the menu and list-prompt
# styles. Hit return to accept, ^G to abort.
#
# To do:
# persuade completion to do ordinary command-line completion inside vared;
# make zse arguments complete style names.
emulate -L zsh
unsetopt ksharrays
local styles line pat
if (( $# )); then
zstyle -L | while read -A line; do
for pat in $*; do
if [[ $line[3] = ${~pat} ]]; then
styles="${styles:+$styles
}$line"
break
fi
done
done
else
styles="$(zstyle -L)"
fi
vared styles && eval $styles
--
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: Odd autoremoveslash behaviour
2000-05-15 15:06 Peter Stephenson
@ 2000-05-15 15:11 ` Peter Stephenson
0 siblings, 0 replies; 4+ messages in thread
From: Peter Stephenson @ 2000-05-15 15:11 UTC (permalink / raw)
To: Zsh hackers list
> I don't think this is anything I've done... it may be only with menu
> completion:
Even more specific: it only happens with menu selection active.
--
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
* Odd autoremoveslash behaviour
@ 2000-05-15 15:06 Peter Stephenson
2000-05-15 15:11 ` Peter Stephenson
0 siblings, 1 reply; 4+ messages in thread
From: Peter Stephenson @ 2000-05-15 15:06 UTC (permalink / raw)
To: Zsh hackers list
I don't think this is anything I've done... it may be only with menu
completion:
% echo <TAB>
% echo dir1/
dir1/ dir2/
type `/':
% echo /
^gorn.
--
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
end of thread, other threads:[~2000-05-16 11:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-16 8:03 Odd autoremoveslash behaviour Sven Wischnowsky
2000-05-16 10:59 ` Peter Stephenson
-- strict thread matches above, loose matches on Subject: below --
2000-05-15 15:06 Peter Stephenson
2000-05-15 15:11 ` 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).