Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Multiline Anonymous Literal Strings
- X-seq: zsh-users 10771
- From: Chris Johnson <cjohnson@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Multiline Anonymous Literal Strings
- Date: Thu, 28 Sep 2006 14:27:01 -0400
- In-reply-to: <34C65928-0F73-4A53-AE7A-9702191AA8D3@xxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20060928175133.GA26895@xxxxxxxxxxxxxxxxx> <34C65928-0F73-4A53-AE7A-9702191AA8D3@xxxxxxxxx>
Michael Hernandez sent me the following 0.7K:
> >Anyone know of a way to compose a long literal string without doing
> >something like this?
> >
> > myvar="this is a really long string so long that I need to break"
> > myvar="$myvar up the assignment"
>
> You can try:
>
> foo="some text on this line \
> more text here \
> yet more here"
>
> the \'s keep everything on one line, i.e. the newlines aren't part of
> the string.
I had disregarded that solution because one can't embed piecewise
comments. Sorry, I failed to mention that. In the mailing list
archives I just found a message about anonymous arrays and how they
aren't supported. All parameter expansion requires a named parameter,
so I think I'm out of luck.
--
Chris Johnson
cjohnson@xxxxxxxxxx
http://www.cs.utk.edu/~cjohnson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author