zsh-workers
 help / color / mirror / code / Atom feed
From: John Beppu <beppu@ax9.org>
To: Michal Maru?ka <mmc@maruska.dyndns.org>
Cc: zsh-workers@sunsite.dk
Subject: Re: (backward-)kill-argument
Date: Wed, 13 Mar 2002 11:09:56 -0800	[thread overview]
Message-ID: <20020313190956.GA24175@Ax9.org> (raw)
In-Reply-To: <m2zo1cxvvl.fsf@linux3.maruska.tin.it>

[  date  ] 2002/03/13 | Wednesday | 05:42 PM
[ author ] Michal Maru?ka <mmc@maruska.dyndns.org> 

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@.^ <!-- japh --> # oss.lineo.com codepoet.org);


  reply	other threads:[~2002-03-13 18:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-13 16:42 (backward-)kill-argument Michal Maruška
2002-03-13 19:09 ` John Beppu [this message]
2002-03-13 20:23   ` (backward-)kill-argument -- reformulation of the problem Michal Maruška
2002-03-15  8:55 ` (backward-)kill-argument Sven Wischnowsky
2002-03-15 15:31   ` (backward-)kill-argument Bart Schaefer
2002-03-15 15:49     ` (backward-)kill-argument Bart Schaefer
2002-03-15 15:49     ` (backward-)kill-argument (1/2 thanks 1/2 problem re-statement) Michal Maruška
2002-03-15 16:39       ` Bart Schaefer
2002-03-18  8:41         ` Sven Wischnowsky
2002-03-18  8:36     ` (backward-)kill-argument Sven Wischnowsky

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=20020313190956.GA24175@Ax9.org \
    --to=beppu@ax9.org \
    --cc=mmc@maruska.dyndns.org \
    --cc=zsh-workers@sunsite.dk \
    /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).