Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Is this the Zsh way for doing this?
- X-seq: zsh-users 7294
- From: DervishD <raul@xxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Is this the Zsh way for doing this?
- Date: Mon, 29 Mar 2004 16:08:18 +0200
- Cc: Zsh Users <zsh-users@xxxxxxxxxx>
- In-reply-to: <1040328210001.ZM26325@xxxxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, Zsh Users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: Pleyades
- References: <20040325223228.GA13221@DervishD> <1040328005531.ZM19873@xxxxxxxxxxxxxxxxxxxxxxx> <1040328010324.ZM19900@xxxxxxxxxxxxxxxxxxxxxxx> <20040328200756.GB6311@DervishD> <1040328210001.ZM26325@xxxxxxxxxxxxxxxxxxxxxxx>
Hi Bart :)
* Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> 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/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author