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

Re: Multiline Anonymous Literal Strings



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