Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Multiline Anonymous Literal Strings
- X-seq: zsh-users 10768
- From: Chris Johnson <cjohnson@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Multiline Anonymous Literal Strings
- Date: Thu, 28 Sep 2006 13:51:33 -0400
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Hi.
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"
In C, contiguous quoted strings are implicitly joined at a compile time:
printf("This is a really long literal strong that will extend "
"beyond 80 characters.\n");
In Perl and other languages, concatenation operators like ., &, and +
are available.
One application of this problem's solution is assigning aliases when the
command is longer than my terminal window. I'd rather not introduce a
variable to make my code look nice. I would like to be able to clean up
the following:
alias mycommand="prog long list of options so long that it will reach
beyond the edge of the screen"
--
Chris Johnson
cjohnson@xxxxxxxxxx
http://www.cs.utk.edu/~cjohnson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author