Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Problem with arrays -- "unknown file attribute"



>>>>> 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