zsh-users
 help / color / mirror / code / Atom feed
From: Mirar <mirar@infovav.se>
To: Andrew Main <zefram@tao.co.uk>
Cc: sweth@astaroth.nit.gwu.edu, zsh-users@math.gatech.edu
Subject: Re: zsh lists being used for spam-gathering?
Date: 12 Dec 1997 21:31:29 +0100	[thread overview]
Message-ID: <82zpm6xpzy.fsf@beldandy.infovav.se> (raw)
In-Reply-To: Andrew Main's message of "Fri, 12 Dec 1997 20:26:18 +0000 (GMT)"

> 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


  reply	other threads:[~1997-12-12 20:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-12-12 17:42 Timothy Luoma
1997-12-12 18:20 ` Bruce Stephens
1997-12-12 18:49   ` Sweth Chandramouli
1997-12-12 19:19     ` Andrew Main
1997-12-12 20:20       ` Mirar
1997-12-12 20:26         ` Andrew Main
1997-12-12 20:31           ` Mirar [this message]
1997-12-12 20:59             ` Andrew Main
1997-12-12 21:06               ` Mirar
1997-12-14 23:03                 ` completion hacking Mirar
1997-12-15 11:18                   ` Andrew Main
1997-12-15 10:06     ` zsh lists being used for spam-gathering? Bruce Stephens
1997-12-12 21:42 ` Richard Coleman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=82zpm6xpzy.fsf@beldandy.infovav.se \
    --to=mirar@infovav.se \
    --cc=sweth@astaroth.nit.gwu.edu \
    --cc=zefram@tao.co.uk \
    --cc=zsh-users@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).