From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3158 invoked from network); 12 Dec 1997 20:39:36 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 12 Dec 1997 20:39:36 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id PAA16390; Fri, 12 Dec 1997 15:30:36 -0500 (EST) Resent-Date: Fri, 12 Dec 1997 15:30:21 -0500 (EST) To: Andrew Main Cc: sweth@astaroth.nit.gwu.edu, zsh-users@math.gatech.edu Subject: Re: zsh lists being used for spam-gathering? References: <199712122026.UAA22236@taos.demon.co.uk> X-Face: $$CzX_6%|HNr.oB"KTJp(4s)x@#{7`R#=qth)@YQVIW3G_vqiReP):T3il:o9H[)hjgs%QU z!Gx^:NL=B(KNK[Y7{`T*hok`uv`}ArWqZ\wF&KHgVYr+d\>oGI?I\60y?,j*xB@gkYk_)YU0]6"S` nEjNqCC Content-Type: TEXT/PLAIN; charset=ISO-8859-1 From: Mirar Date: 12 Dec 1997 21:31:29 +0100 In-Reply-To: Andrew Main's message of "Fri, 12 Dec 1997 20:26:18 +0000 (GMT)" Message-ID: <82zpm6xpzy.fsf@beldandy.infovav.se> X-Mailer: Gnus v5.4.66/Emacs 19.34 Resent-Message-ID: <"-YZht3.0.O_3.SxPaq"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1198 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > print -l blah**blah Nice. Thanks. > Why do you want newline-separated filenames anyway? I run sed on the lines later. I don't want to be messed up with filenames containing spaces, either. Right now i only find this script using ls -d1: compctl -k "(- -a -d -F -l -r -t -M -T -s -k -f)" \ -K compmanfull \ -x "C[-1,-s^],s[-s]" -K compmansections \ - "r[-f,;]" -f \ - "r[-k,;]" -k "()" \ - "r[-s,;]" -K compmansection \ -- man compmanfull() { reply=(${^manpath}/man*/*(N:t:r)) } compmansections() { reply=($(ls -d1 ${^manpath}/man*(N:/) | sed 's:^.*/man::')) } compmansection() { local a read -Ac a echo $a | sed -ne 's/^.* -s\([^ ]*\).*$/\1/p' | read prefix reply=(${^manpath}/man$prefix/*(N:t:r)) } if someone has better solutions, it would be interesting. compmansections() { reply=($(ls -d1 ${^manpath}/man*(N:/) | sed 's:^.*/man::')) } should be changed for compmansections() { reply=($(print -l ${^manpath}/man*(N:/) | sed 's:^.*/man::')) } for a start... /Mirar