Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Problem with arrays -- "unknown file attribute"
- X-seq: zsh-users 13644
- From: Greg Klanderman <gak@xxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Problem with arrays -- "unknown file attribute"
- Date: Mon, 05 Jan 2009 11:10:25 -0500
- In-reply-to: <alpine.LNX.2.00.0901050426390.17470@xxxxxxxxxxxxxxx> (Benjamin R. Haskell's message of "Mon, 5 Jan 2009 04:39:18 -0500 (EST)")
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <b11ea23c0901050004h4f1825egc01d39c1f74c0ef0@xxxxxxxxxxxxxx> <alpine.LNX.2.00.0901050308270.17470@xxxxxxxxxxxxxxx> <20090105092403.GA7733@xxxxxxxxxxxxxxx> <alpine.LNX.2.00.0901050426390.17470@xxxxxxxxxxxxxxx>
- Reply-to: gak@xxxxxxxxxxxxxx
>>>>> Benjamin R Haskell <zsh@xxxxxxxxxx> writes:
> The ${(f)"$(command stuff)"} idiom is especially useful in general. But, in this
> case, neither of these works, since sqlite3 returns multiple tables per line:
So doesn't that just mean you need space *and* newline in IFS?
I think you should also be able to use:
TABS=(${(ps:\n: :)"$(sqlite3 $DB .tables)"})
If you stick with setting IFS, you probably want to declare it local
in your function so you don't mutate the global value.
Either way, you'll have a problem if table names contain spaces.
greg
Messages sorted by:
Reverse Date,
Date,
Thread,
Author