From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24696 invoked from network); 29 Mar 2004 14:48:54 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 29 Mar 2004 14:48:54 -0000 Received: (qmail 12641 invoked by alias); 29 Mar 2004 14:48:25 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7294 Received: (qmail 12629 invoked from network); 29 Mar 2004 14:48:25 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 29 Mar 2004 14:48:25 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [130.225.247.86] by sunsite.dk (MessageWall 1.0.8) with SMTP; 29 Mar 2004 14:48:25 -0000 Received: (qmail 2824 invoked from network); 29 Mar 2004 14:48:24 -0000 Received: from madrid10.amenworld.com (62.193.203.32) by a.mx.sunsite.dk with SMTP; 29 Mar 2004 14:48:22 -0000 Received: from DervishD.pleyades.net (212.Red-80-35-44.pooles.rima-tde.net [80.35.44.212]) by madrid10.amenworld.com (8.10.2/8.10.2) with ESMTP id i2TEmHP02526; Mon, 29 Mar 2004 16:48:18 +0200 Received: from raul@pleyades.net by DervishD.pleyades.net with local (Exim MTA 2.05) id <1B7xR4-0001vc-00>; Mon, 29 Mar 2004 16:08:18 +0200 Date: Mon, 29 Mar 2004 16:08:18 +0200 From: DervishD To: Bart Schaefer Cc: Zsh Users Subject: Re: Is this the Zsh way for doing this? Message-ID: <20040329140818.GB7384@DervishD> Mail-Followup-To: Bart Schaefer , Zsh Users References: <20040325223228.GA13221@DervishD> <1040328005531.ZM19873@candle.brasslantern.com> <1040328010324.ZM19900@candle.brasslantern.com> <20040328200756.GB6311@DervishD> <1040328210001.ZM26325@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1040328210001.ZM26325@candle.brasslantern.com> User-Agent: Mutt/1.4.2.1i Organization: Pleyades 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 Hi Bart :) * Bart Schaefer dixit: > } > # At this point you might also want to clean wildcards and slashes > } > # out of $track_name, but that's up to you. Your original doesn't. > } No, it doesn't because I didn't thought of it :( Thanks for > } pointing. Could it be solved using the (q) flag or should I use ${//} > } and substitute every dangerous character for a safe version? > The substituion is necessary for slashes, because you can't even create a > file with slashes in the name. Of course, I didn't think of it, but a song name may have any character :( Well, that's simple using ${/\/|/} on the appropriate parameter, or something like that. > The (q) flag is _not_ necessary for other metacharacters when creating > the file (the argument to "mv" is already double-quoted); the problem > would be with manipulating the names later. So doing either nothing or > the substitution is appropriate in that case. Manipulating the names later is not a problem, since Zsh behaves quite well quoting when completing, etc... The only problem could be names starting with '-', but almost all Linux utilities admit '--' as end-of-options separator. Again, thanks for your useful advice :) Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 http://www.pleyades.net & http://raul.pleyades.net/