Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Multiline Anonymous Literal Strings
- X-seq: zsh-users 10770
- From: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Multiline Anonymous Literal Strings
- Date: Thu, 28 Sep 2006 20:26:03 +0200
- In-reply-to: <20060928175133.GA26895@xxxxxxxxxxxxxxxxx>
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Operating-system: Linux 2.6.16.16 i686
- References: <20060928175133.GA26895@xxxxxxxxxxxxxxxxx>
Chris Johnson <cjohnson@xxxxxxxxxx>:
> 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"
[snip]
myvar="this is a really long string so long that I need to break "
myvar+="up the assignment."
print ${myvar}
[snap]
[...]
> 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"
[snip]
pa=(
-l
one
two
three
four
five
six
)
alias p="print ${pa}"
[snap]
Regards, Frank
Messages sorted by:
Reverse Date,
Date,
Thread,
Author