Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
noquote for quotes as in noglob for filename generation?
- X-seq: zsh-users 14471
- From: Nazri Ramliy <ayiehere@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: noquote for quotes as in noglob for filename generation?
- Date: Sat, 10 Oct 2009 11:01:28 +0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=YsIs8TkwnNVP7X6EP7n5vZMnHGZ1D1CA+OeMmRAAOm0=; b=u6Bc9mN9Mn0CsZbUcWaSiTLMxVLlkQwxVyFYv9hQ4BFF5WE9teoqrIqv9TF/L5BBAX sYYdtePNtDDvadZTbHFMZAci5hDl/pE0rUMtzEqq3ObG5PUzOCF9o37DR8sCTpXQvZBg Etw+sLRHCsK86twml8Mr6MVUeWQOyQ5VEHgvU=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Lals6hDUaOjV/qsyoAeOiK64lNqObHOZ6iXFEN7vbAjgbQ+LUiCH79N8kclGxB3stB JFWrvsl/kul+iX8VESOdRfdpJuhUWC0E/D5ePpgXjaa7HNlVH5snf2zj77+7R0dN66Je A01MlyeGwr1utAYhO3/SkOPRDljOfb3ypUjEM=
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Hello list,
Is there an equivalent 'noquote' for quotes (as in noglob for filename
generation)?
What I'm trying todo:
I have a shell script named 'sql':
that does pretty much this:
$ cat ~/bin/sql
<uninteresting details omitted...>
sql_command=`noglob echo "$@"` # Note the noglob!
eval mysql -u $username -p$password $db "\"$sql\""
And in my .zshrc:
alias select='sql select'
alias insert='sql insert'
alias update='sql update'
This allows me to run sql queries directly from zsh command line prompt without
directly invoking mysql. The advantage is obvious: I can run sql commands
directly from zsh prompt, which gives me all the bells and whistles of command
line processing that comes with zsh (honorary mention: the _programmable_
completion).
The 'noglob' above allows me to do
$ select * from Artist
instead of
$ select \* from Artist
Now I want to be able to do
$ select * from Artist where name like '%Jackson'
instead of
$ select * from Artist where name like \'%Jackson\'
Is there an easy solution (like noglob) that I can use here?
Thanks in advance for any pointers and help.
Nazri.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author