about summary refs log tree commit diff
path: root/Completion/Core
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2000-05-22 17:52:40 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2000-05-22 17:52:40 +0000
commitbdfda774b7d700565862b23ffd4544f40ea9a4db (patch)
treebc197b657007c857f41d0a6577d0c66ffae86f5e /Completion/Core
parent7d19431901041fa8a5ed7154ce4d285c40beade9 (diff)
downloadzsh-bdfda774b7d700565862b23ffd4544f40ea9a4db.tar.gz
zsh-bdfda774b7d700565862b23ffd4544f40ea9a4db.tar.xz
zsh-bdfda774b7d700565862b23ffd4544f40ea9a4db.zip
11516: Completion/Core/compinstall: menu selection
Diffstat (limited to 'Completion/Core')
-rw-r--r--Completion/Core/compinstall34
1 files changed, 21 insertions, 13 deletions
diff --git a/Completion/Core/compinstall b/Completion/Core/compinstall
index ae9cb1593..377e247fb 100644
--- a/Completion/Core/compinstall
+++ b/Completion/Core/compinstall
@@ -233,7 +233,8 @@ else
     print "Completion directories $compdir/*
 are already in your \$fpath, good."
   else
-    print "Completion directory $compdir is already in your \$fpath, good."
+    print "Completion directory $compdir
+is already in your \$fpath, good."
   fi
   if [[ -n $fpath_line ]]; then
     print "I shall keep the existing \$fpath=( ... ) assignment."
@@ -1241,6 +1242,7 @@ this case.  Do you want this?
 
 __ci_do_selection() {
   local key listc menu select amenu elt
+  integer num
 
   __ci_get_this_style list-colors listc
   __ci_get_this_style menu menu
@@ -1307,17 +1309,18 @@ number of completions.  Please enter:
 - 0 or 1, to turn this feature on unconditionally
 - a higher number to turn this feature on when there are that many
   completions
-- an \`l' for \`long' to turn it on for completions which don't fit on the
-  screen
+- an \`l' for \`long' to turn it on for listings which don't fit on the
+  screen.
 - an \`ll' for \`long list' to turn it on for completions which don't fit
   on the screen, even for commands which only do listing of completions.
+  This may be combined with a number which will be used in ordinary selection.
 - a negative number to turn this feature off
 - an empty line to leave the setting the way it is.
 "
          while true; do
            vared -eh -p 'value> ' select
-	   [[ -z $select || $select = ((-|)<->|l#) ]] && break;
-	   print "Type a number, l, ll, or an empty line." >&2
+	   [[ -z $select || $select = ((-|)<->|l|<->#ll<->#) ]] && break;
+	   print "Type a number, l, ll, ll<num>, or an empty line." >&2
 	 done
 	 amenu=(${=menu})
 	 elt=${amenu[(i)*select*]}
@@ -1330,15 +1333,20 @@ number of completions.  Please enter:
 	        fi
 		menu="$amenu"
 		;;
-	   l#) if [[ $select = l ]]; then
-                 select=long
-               else
-                 select=long-list
-               fi
-               if [[ -n $elt ]]; then
-                 amenu[$elt]="select=$select"
+	   *ll*) num=${(RS)select##ll}
+	         select="select=long-list"
+		 [[ -n $num ]] && select="$select select=$num"
+		 if [[ -n $elt ]]; then
+		   amenu[$elt]=$select
+		 else
+		   amenu=($amenu $select)
+		 fi
+		 menu="$amenu"
+		 ;;
+	   l#) if [[ -n $elt ]]; then
+                 amenu[$elt]="select=long"
                else
-                 amenu=($amenu "select=$select")
+                 amenu=($amenu "select=long")
                fi
 	       menu="$amenu"
                ;;