zsh-users
 help / color / mirror / code / Atom feed
From: DervishD <raul@pleyades.net>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh Users <zsh-users@sunsite.dk>
Subject: Re: Is this the Zsh way for doing this?
Date: Mon, 29 Mar 2004 16:08:18 +0200	[thread overview]
Message-ID: <20040329140818.GB7384@DervishD> (raw)
In-Reply-To: <1040328210001.ZM26325@candle.brasslantern.com>

    Hi Bart :)

 * Bart Schaefer <schaefer@brasslantern.com> 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/


      reply	other threads:[~2004-03-29 14:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-25 22:32 DervishD
2004-03-28  0:55 ` Bart Schaefer
2004-03-28  1:03   ` Bart Schaefer
2004-03-28 20:07     ` DervishD
2004-03-28 21:00       ` Bart Schaefer
2004-03-29 14:08         ` DervishD [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040329140818.GB7384@DervishD \
    --to=raul@pleyades.net \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).