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

Re: 3.1.6-pws-5



Peter Stephenson wrote:

> I had to apply a couple of patches to _path_files by hand.  It didn't look
> like the code was too far out from what the patches were expecting, though.
> Partly as a consequence (i.e. I got confused), 7945 isn't listed in the
> ChangeLog, but has been applied (it is listed below).

My apologies for that.

This should fix the last bits...

Bye
 Sven

diff -u -r oldcompletion/Core/_path_files Completion/Core/_path_files
--- oldcompletion/Core/_path_files	Mon Sep 20 16:04:04 1999
+++ Completion/Core/_path_files	Mon Sep 20 16:12:33 1999
@@ -364,31 +364,31 @@
       if [[ -n $menu ]]; then
         [[ -n "$compconfig[path_cursor]" ]] && compstate[to_end]=''
         if [[ "$tmp3" = */* ]]; then
-	  compadd -QUf -p "$linepath${testpath:q}" -s "/${tmp3#*/}" \
+	  compadd -Qf -p "$linepath${testpath:q}" -s "/${tmp3#*/}" \
 	          -W "$prepath$realpath$testpath" "$ignore[@]" \
 		  "$addpfx[@]" "$addsfx[@]" "$remsfx[@]" -M 'r:|/=* r:|=*' \
-+ 		  "$group[@]" "$expl[@]" \
+		  "$group[@]" "$expl[@]" \
 		  - "${(@)${(@)tmp1%%/*}:q}"
 	else
-	  compadd -QUf -p "$linepath${testpath:q}" \
+	  compadd -Qf -p "$linepath${testpath:q}" \
 	          -W "$prepath$realpath$testpath" "$ignore[@]" \
-		   "$addpfx[@]" "$addsfx[@]" "$remsfx[@]" \
+		   "$addpfx[@]" "$addsfx[@]" "$remsfx[@]" -M 'r:|/=* r:|=*' \
 		   "$group[@]" "$expl[@]" \
 		   - "${(@)tmp1:q}"
 	fi
       else
         if [[ "$tmp3" = */* ]]; then
           for i in "$tmp1[@]"; do
-	    compadd -QUf -p "$linepath${testpath:q}" -s "/${${i#*/}:q}" \
+	    compadd -Qf -p "$linepath${testpath:q}" -s "/${${i#*/}:q}" \
 		    -W "$prepath$realpath$testpath" "$ignore[@]" \
 		    "$addpfx[@]" "$addsfx[@]" "$remsfx[@]" -M 'r:|/=* r:|=*' \
 		    "$group[@]" "$expl[@]" \
 		    - "${${i%%/*}:q}"
 	  done
         else
-	  compadd -QUf -p "$linepath${testpath:q}" \
+	  compadd -Qf -p "$linepath${testpath:q}" \
 		  -W "$prepath$realpath$testpath" "$ignore[@]" \
-		  "$addpfx[@]" "$addsfx[@]" "$remsfx[@]" \
+		  "$addpfx[@]" "$addsfx[@]" "$remsfx[@]" -M 'r:|/=* r:|=*' \
 		  "$group[@]" "$expl[@]" \
 		  - "${(@)tmp1:q}"
         fi
@@ -415,12 +415,12 @@
     tmp3="${tmp3#*/}"
   done
 
-  if [[ -z "$tmp4" ]]; then 
-     PREFIX="${opre}${osuf}"
-     SUFFIX=""
-     compadd -QUf -p "$linepath${testpath:q}" \
+  if [[ -z "$tmp4" ]]; then
+    PREFIX="${opre}${osuf}"
+    SUFFIX=""
+    compadd -Qf -p "$linepath${testpath:q}" \
 	    -W "$prepath$realpath$testpath" "$ignore[@]" \
-	    "$addpfx[@]" "$addsfx[@]" "$remsfx[@]" \
+	    "$addpfx[@]" "$addsfx[@]" "$remsfx[@]" -M 'r:|/=* r:|=*' \
 	    "$group[@]" "$expl[@]" \
 	    - "${(@)tmp1:q}"
   fi
@@ -434,9 +434,9 @@
 
 if [[ -n "$compconfig[path_expand]" &&
       $#exppaths -gt 0 && nm -eq compstate[nmatches] ]]; then
-   PREFIX="${opre}${osuf}"
-   SUFFIX=""
-   compadd -Q -S '' "$group[@]" "$expl[@]" \
+  PREFIX="${opre}${osuf}"
+  SUFFIX=""
+  compadd -Q -S '' "$group[@]" "$expl[@]" \
           -M 'r:|/=* r:|=*' -p "$linepath" - "$exppaths[@]"
 fi
 
diff -u od/Zsh/compsys.yo Doc/Zsh/compsys.yo
--- od/Zsh/compsys.yo	Mon Sep 20 16:03:38 1999
+++ Doc/Zsh/compsys.yo	Mon Sep 20 16:05:00 1999
@@ -1153,6 +1153,29 @@
 this is not set by the user, it will automatically be set to a list
 of group names taken from the YP database or the file `tt(/etc/group)'.
 )
+item(tt(hosts))(
+An array holding the names of hosts that should be completed. If this
+is not set by the user it will automatically be set to a list of the
+hostnames in `tt(/etc/hosts)'.
+)
+item(tt(ports))(
+An array holding the service names of ports to complete. If this is
+not set by the user, it will be set to a list of the service names
+from `tt(/etc/services)'.
+)
+item(tt(telnet_hosts_ports_users))(
+This array is used by the completion function for tt(telnet). It
+should contain elements of the form
+`var(host)tt(:)var(port)tt(:)var(user)'. These triples will be used to 
+complete names of hosts, ports, and usernames depending on the
+information already on the line, so that if, for example, the hostname 
+is already typed, only those ports and usernames will be completed for 
+which triples with the hostname from the line exist.
+)
+item(tt(socket_hosts_ports))(
+Like tt(telnet_hosts_ports_users), but used for the tt(socket) command 
+and containing pairs of hostnames and ports.
+)
 enditem()
 
 subsect(Configuration keys)

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author