From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1272 invoked from network); 20 Sep 1999 14:12:49 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 20 Sep 1999 14:12:49 -0000 Received: (qmail 22168 invoked by alias); 20 Sep 1999 14:12:39 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7959 Received: (qmail 22161 invoked from network); 20 Sep 1999 14:12:39 -0000 Date: Mon, 20 Sep 1999 16:12:37 +0200 (MET DST) Message-Id: <199909201412.QAA12313@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Peter Stephenson's message of Mon, 20 Sep 1999 14:22:24 +0200 Subject: 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@informatik.hu-berlin.de