Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: Re: PATCH: Re: long completion selections and listings



Sven wrote:
> Peter Stephenson wrote:
> > It does say that in the manual.  What's confusing me is that (if I've read
> > this right), list-prompt uses a default if you don't set it to the empty
> > string, and select-prompt is the other way round.  I think I've handled
> > that difference in the following.
> 
> The manual was wrong.

That means compinstall should do the same for list-prompt as it does for
select-prompt.

Index: Completion/Core/compinstall
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/compinstall,v
retrieving revision 1.17
diff -u -r1.17 compinstall
--- Completion/Core/compinstall	2000/07/12 10:20:00	1.17
+++ Completion/Core/compinstall	2000/07/12 10:42:40
@@ -1394,18 +1394,16 @@
 string turns this feature off.  It can contain \`%l' to show the number of
 matches as \`current_number/total_number', \`%p' to show the fraction of
 the way down the list, or font-control sequences such as %B, %U, %S and the
-corresponding %b, %u, %s; quotes will be added automatically.  Note that
-this is the default behaviour; delete the whole line to turn it off, in
-which case the display of completions which don't fit on the screen is
-controlled by the LISTMAX parameter (currently ${LISTMAX:-unset}), which
-specifies the maximum number to show without asking.  Hit return to keep
-the current value.
+corresponding %b, %u, %s; quotes will be added automatically.  Delete the
+whole line to turn this behaviour off, in which case the display of
+completions which don't fit on the screen is controlled by the LISTMAX
+parameter (currently ${LISTMAX:-unset}), which specifies the maximum number
+to show without asking.  Hit return to keep the current value.
 "
          [[ -z $haslistp ]] &&
 	   listp='%SAt %p: Hit TAB for more, or the character to insert%s'
 	 vared -eh -p 'prompt> ' -c listp
-	 # Unconditionally use listp; will become '' if empty.
-	 haslistp=1
+	 [[ -z $listp ]] && haslistp=
 	 ;;
       q) return 1
          ;;

-- 
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