Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Porting an alias from bash to zsh fails.
- X-seq: zsh-users 8099
- From: Lloyd Zusman <ljz@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Porting an alias from bash to zsh fails.
- Date: Sun, 24 Oct 2004 00:25:45 -0400
- Cancel-lock: sha1:J/t93sP3h5vYZvNEBaCSk/lGDF8=
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20041023215252.GA24164@xxxxxxxxxxxxxxxxxxx> <m3mzyd6pzp.fsf@xxxxxxxxxx> <20041023231442.GA24632@xxxxxxxxxxxxxxxxxxx> <Pine.LNX.4.61.0410232057370.23496@xxxxxxxxxxxxxxxxxx>
- Sender: news <news@xxxxxxxxxxxxx>
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> writes:
> [ ... ]
>
> On Sat, 23 Oct 2004, s. keeling wrote:
>
>> Incoming from Lloyd Zusman:
>> > alias dfn="rxvt +sb -fn '$RXVTNEWSFONT' -geometry 128x51+69+42 \
>> > -e nice /usr/bin/slrn -f /home/keeling/.jnewsrc-dfn \
>> > -h news.individual.net"
>> > [snip]
>> >
>> > This works because the single quotes are treated as normal (non-quoting)
>> .....................^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> > characters when inside of double quotes; therefore, the RXVTNEWSFONT
>> ..^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> That was a surprise to me. Thanks. Your excellent explanation has
>> solved it for me. Much appreciated.
>
> Lloyd's suggestion works in this case, but it would fail in the event that
> the value of the variable contained any single-quote characters. A better
> solution would be to swap the single and double quotes:
>
> alias dfn='rxvt +sb -fn "$RXVTNEWSFONT" -geometry 128x51+69+42 ...'
Well, as you probably know, that's another of the suggestions that I
made (see the bottom part of my original reply in this thread).
--
Lloyd Zusman
ljz@xxxxxxxxxx
God bless you.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author