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

Re: Porting an alias from bash to zsh fails.

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
 God bless you.

Messages sorted by: Reverse Date, Date, Thread, Author