From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2615 invoked from network); 30 Nov 2004 02:01:50 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 30 Nov 2004 02:01:50 -0000 Received: (qmail 16456 invoked from network); 30 Nov 2004 02:01:44 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 30 Nov 2004 02:01:44 -0000 Received: (qmail 2973 invoked by alias); 30 Nov 2004 02:00:51 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8250 Received: (qmail 2944 invoked from network); 30 Nov 2004 02:00:50 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 30 Nov 2004 02:00:50 -0000 Received: (qmail 14374 invoked from network); 30 Nov 2004 01:59:51 -0000 Received: from moonbase.zanshin.com (64.84.47.139) by a.mx.sunsite.dk with SMTP; 30 Nov 2004 01:59:49 -0000 Received: from toltec.zanshin.com (toltec.zanshin.com [64.84.47.166]) by moonbase.zanshin.com (8.13.1/8.13.1) with ESMTP id iAU1xltK007030 for ; Mon, 29 Nov 2004 17:59:47 -0800 Date: Mon, 29 Nov 2004 17:59:47 -0800 (PST) From: Bart Schaefer Reply-To: zsh-users@sunsite.dk To: zsh-users@sunsite.dk Subject: Re: scp and noglob In-Reply-To: <20041129205603.GA5217@kubieziel.de> Message-ID: References: <20041129205603.GA5217@kubieziel.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 On Mon, 29 Nov 2004, Jens Kubieziel wrote: > scp $SERVER:*.c . > Zsh tries to expand *.c and I have to insert a 'noglob'. Is there a way > to tell zsh to don't expand all filenames which are on the serverside? If you have zsh 4.2.x, try the url-quote-magic widget that's included in the Functions/Zle directory in the distribution. Load it like this: autoload -U url-quote-magic zle -N self-insert url-quote-magic Then trick it into treating any hostname as a URL scheme when the command name is "scp", by doing this (note placement of single/double quotes): zstyle -e :urlglobber url-other-schema \ '[[ $words[1] == scp ]] && reply=("*") || reply=(http https ftp)' (Read the comments in the function file for an explanation of why the context is ":urlglobber", if you care.) Then just type your scp command and watch what happens.