From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11971 invoked by alias); 20 Mar 2013 05:47:11 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 31170 Received: (qmail 13764 invoked from network); 20 Mar 2013 05:47:08 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at linux.vnet.ibm.com does not designate permitted sender hosts) Date: Wed, 20 Mar 2013 13:36:36 +0800 From: Han Pingtian To: zsh-workers@zsh.org Subject: Re: [PATCH] scp distinguish local file from remote file Message-ID: <20130320053636.GA3512@localhost.localdomain> References: <20130319093359.GA21738@localhost.localdomain> <20130319205939.328e9010@pws-pc.ntlworld.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130319205939.328e9010@pws-pc.ntlworld.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13032005-5806-0000-0000-000020688CE0 On Tue, Mar 19, 2013 at 08:59:39PM +0000, Peter Stephenson wrote: > On Tue, 19 Mar 2013 17:33:59 +0800 > Han Pingtian wrote: > > If a file path starting with a '.' or '/', then it should be a local > > file/dir, even if there are colons in the path. > > Right. In fact, any slash before the colon should have that effect, > shouldn't it? > > > - if compset -P '*:'; then > > + if compset -P '[^./]*:'; then > > So maybe the pattern could be '[^./][^/]#:'? > Yeah, it is true. Thanks for the correction.