difficult alias

Ray Andrews <[email protected]>
Newsgroups gmane.comp.shells.zsh.devel,gmane.comp.shells.zsh.user
Message-ID <[email protected]>
  % var="now is the time"

%  alias tst='echo $var | sed '\'s/the/THE/g\'''

... works.  But:

% alias tst='echo $var | fold -sw 80 | sed '\':a;N;$!ba;s/\n/\n /g\'''
zsh: command not found: N
zsh: now is the time not found

... can that alias be repaired?  The command run directly is fine, but 
the obscure stuff at the beginning of the 'sed' doesn't want to be 
aliased.  zsh seems to take the >:a;N;$!ba;< stuff as not being part of 
the sed.  AI recommended that BTW, I have no idea what it means, but it 
seems to make >\n\n   < possible which it wouldn't otherwise be.  Unless 
there's a  better way entirely ...

It just moves a block of text that's otherwise unwrapped into a nicer 
display: word wrap at 80 columns and spaced off the left margin by four 
chars.  Frivolous but I like it.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.