From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: Re: long completion selections and listings
Date: Wed, 12 Jul 2000 11:23:27 +0200 (MET DST) [thread overview]
Message-ID: <200007120923.LAA20826@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Peter Stephenson's message of Tue, 11 Jul 2000 16:29:06 +0100
Peter Stephenson wrote:
> According to the manual, select-prompt has a default when you used
> scrolling with menus. It doesn't show up for me --- I had to set it
> explicitly. (If I remember right, I didn't put it in compinstall because
> there was already a sensible default.)
You get the default when setting select-prompt to the empty string and
that works for me.
> Another thing, maybe I misunderstood somewhere, but I have
> zstyle ':completion:*' menu 'select=long' 'select=5'
> Since I don't have select=long-list, I wouldn't expect long listings to
> switch automatically to menu selection, but at the moment they do.
> Lists which do fit on the screen don't.
I hope you meant this: it shouldn't start menu selection if not
starting menu completion. Right.
Bye
Sven
Index: Completion/Core/_main_complete
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/_main_complete,v
retrieving revision 1.35
diff -u -r1.35 _main_complete
--- Completion/Core/_main_complete 2000/07/03 08:05:27 1.35
+++ Completion/Core/_main_complete 2000/07/12 09:22:39
@@ -175,7 +175,7 @@
-n "$_menu_style[(r)(yes|true|on|1)=long-list]" ) ]]; then
compstate[insert]=menu
elif [[ "$compstate[insert]" = "$_saved_insert" ]]; then
- if [[ -n "$_menu_style[(r)select=long]" && tmp -gt LINES ]]; then
+ if [[ -n "$_menu_style[(r)(yes|true|1|on)=long]" && tmp -gt LINES ]]; then
compstate[insert]=menu
else
sel=( "${(@M)_menu_style:#(yes|true|1|on)*}" )
@@ -183,11 +183,13 @@
if (( $#sel )); then
min=9999999
for i in "$sel[@]"; do
- if [[ "$i" = *\=* ]]; then
+ if [[ "$i" = *\=[0-9]* ]]; then
num="${i#*\=}"
[[ num -lt 0 ]] && num=0
- else
- num=$nm
+ elif [[ "$i" != *\=* ]]; then
+ num=0
+ else
+ num=9999999
fi
[[ num -lt min ]] && min="$num"
@@ -199,11 +201,13 @@
if (( $#sel )); then
max=9999999
for i in "$sel[@]"; do
- if [[ "$i" = *\=* ]]; then
+ if [[ "$i" = *\=[0-9]* ]]; then
num="${i#*\=}"
[[ num -lt 0 ]] && num=0
- else
+ elif [[ "$i" != *\=* ]]; then
num=0
+ else
+ num=9999999
fi
[[ num -lt max ]] && max="$num"
@@ -229,20 +233,22 @@
elif [[ -n "$_menu_style[(r)select=long*]" ]]; then
if [[ tmp -gt LINES ]]; then
zmodload -i zsh/complist
- MENUSELECT=0
+ MENUSELECT=00
fi
fi
- if [[ "$MENUSELECT" != 0 ]]; then
+ if [[ "$MENUSELECT" != 00 ]]; then
sel=( "${(@M)_menu_style:#select*}" )
if (( $#sel )); then
min=9999999
for i in "$sel[@]"; do
- if [[ "$i" = *\=* ]]; then
+ if [[ "$i" = *\=[0-9]* ]]; then
num="${i#*\=}"
[[ num -lt 0 ]] && num=0
- else
+ elif [[ "$i" != *\=* ]]; then
num=0
+ else
+ num=9999999
fi
[[ num -lt min ]] && min="$num"
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~2000-07-12 9:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-07-12 9:23 Sven Wischnowsky [this message]
2000-07-12 10:14 ` PATCH: " Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200007120923.LAA20826@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).