From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2597 invoked from network); 26 Jun 2007 23:56:36 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.1 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 26 Jun 2007 23:56:36 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 582 invoked from network); 26 Jun 2007 23:56:28 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 26 Jun 2007 23:56:28 -0000 Received: (qmail 10778 invoked by alias); 26 Jun 2007 23:56:21 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11595 Received: (qmail 10764 invoked from network); 26 Jun 2007 23:56:20 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 26 Jun 2007 23:56:20 -0000 Received: (qmail 99368 invoked from network); 26 Jun 2007 23:56:20 -0000 Received: from redoubt.spodhuis.org (HELO mx.spodhuis.org) (193.202.115.177) by a.mx.sunsite.dk with SMTP; 26 Jun 2007 23:56:16 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=first1; d=spodhuis.org; h=Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; b=XQiVUk0zS7pxnzbhksTN4evjiInoF47XQSDT7088Z1ytwVaPDBhHWKQd/RiTVWsmLKhxOt5LEfaQSS8Hg8HKyeQsChANxCjRV4P1Gl1bWpJ4TZwHGoqti4g5U0H6JeckfTktd8BtbAExPluosD+o7sdQKXBZIpl/s2tne6COF40=; Received: by smtp.spodhuis.org with local id 1I3KtL-000IVX-0U; Tue, 26 Jun 2007 23:56:15 +0000 Date: Tue, 26 Jun 2007 16:56:14 -0700 From: Phil Pennock To: Zsh users list Subject: Re: turn off globbing sometimes Message-ID: <20070626235614.GA70915@redoubt.spodhuis.org> Mail-Followup-To: Zsh users list References: <20070625143801.GB27030@scowler.net> <2d460de70706260927p45718db7gb0089fc2a26e3e7a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: > On 6/26/07, Richard Hartmann wrote: > > > > > > > alias command="noglob command" > > > > How could I turn globbing off for the _remote_ part of scp? > > > > I.e. > > scp remote:foo/* . > > should not expand, while > > scp * remote:foo/ > > should expand normally. Any ideas? alias scp='noglob scp_wrap' function scp_wrap { local -a args local i for i in "$@"; do case $i in (*:*) args+=($i) ;; (*) args+=(${~i}) ;; esac; done command scp "${(@)args}" } There's probably a way to inline the ~ GLOB_SUBST enabling only on elements of an array matching a pattern, whilst leaving the array element ordering unmutated. Regards, -Phil