From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2897 invoked from network); 13 Mar 2002 18:58:36 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 13 Mar 2002 18:58:36 -0000 Received: (qmail 20127 invoked by alias); 13 Mar 2002 18:58:30 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16825 Received: (qmail 20111 invoked from network); 13 Mar 2002 18:58:29 -0000 Date: Wed, 13 Mar 2002 11:09:56 -0800 From: John Beppu To: Michal Maru?ka Cc: zsh-workers@sunsite.dk Subject: Re: (backward-)kill-argument Message-ID: <20020313190956.GA24175@Ax9.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.27i [ date ] 2002/03/13 | Wednesday | 05:42 PM [ author ] Michal Maru?ka Finally, something I can answer. ;-) > i want to: > * kill filenames w/ spaces: e.g. this\ is\ file.txt rm *[\ ]* This uses a character class with a space in it '[\ ]' surrounded by whatever '*' which zsh understands as any file with a space in its name. > * maybe even the bracketed part: > find { -name '*.h' } print **/*.h This uses the '**/' to tell zsh to glob recursively, and the '*.h' says to look for '*.h' while it's at it. If you study zsh's globbing, you'll find that it can do a lot of the same things the find(1) program can do. To learn about some of zsh's find-like abilities, $(man zshexpn) and search for "Glob Qualifiers". Glob qualifiers allow you to put an expression in parentheses after a glob pattern to make the glob more specific. For example: find . -type d # find directories only can be expressed in zsh as: print -l **/*(/) # (/) means directories only I only suggest starting with glob qualifiers, because I found it the most interesting (and least intimidating) place to start. To get the whole picture, $(man zshexpn) and search for the "FILENAME EXPANSION" section. -- package wuv'apqvjgt;($_=join('',(*PgtnHcemgt))) # print map "beppu\@$_\n", qw( =~ s/([HaP])(?!e)/ \U>$1/g;s/^.|:| (?=A)|>//g;y # cpan.org lbox.org binq.org /c-z/a-u/;print"J$_\n";#$^%$^X@.^ # oss.lineo.com codepoet.org);