From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2675 invoked from network); 13 Jun 2001 11:47:11 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 13 Jun 2001 11:47:11 -0000 Received: (qmail 9020 invoked by alias); 13 Jun 2001 11:46:23 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14899 Received: (qmail 9004 invoked from network); 13 Jun 2001 11:46:22 -0000 X-Authentication-Warning: candle.brasslantern.com: schaefer set sender to lantern@shell10.ba.best.com using -f From: "Bart Schaefer" Message-Id: <1010613114538.ZM26897@candle.brasslantern.com> Date: Wed, 13 Jun 2001 11:45:38 +0000 X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: The group-order and tag-order styles MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Given the following always in effect: zstyle ':completion:*' format 'Completing %d' zstyle ':completion:*' group-name '' Fiddling with ssh completion (see zsh-users thread) I now have this: zstyle ':completion:*:ssh:*' tag-order 'hosts:-domain hosts:-ipaddr *' zstyle ':completion:*:ssh:*' group-order \ hosts:-domain:domains users 'hosts:-ipaddr:IP addresses' \* zstyle ':completion:*:ssh:*:hosts-domain' ignored-patterns '<->.<->.<->.<->' zstyle ':completion:*:ssh:*:hosts-ipaddr' ignored-patterns '^<->.<->.<->.<->' zstyle -e ':completion:*:ssh:*' hosts 'reply=( ${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) \ /dev/null)"}%%[# ]*}//,/ } ${=${(f)"$(cat /etc/hosts(|)(N) <<(ypcat hosts 2>/dev/null))"}%%\#*} )' With just the last of these styles, completion after `ssh' lists two groups: hosts first, then users. What I want to see is three groups: hosts by domain name, then users, then hosts by IP address. Adding the other styles successfully splits the result into three groups, but the users are always listed first. Also, the explanation strings (`domains' and `IP addresses') from the group-order style are never shown in the listing. What am I missing? -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net