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

Re: Can I put a newline in an alias?

On Sat 07/19/97 at 09:02 PM -0700, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:

> zsh% alias this_has_a_newline='echo this
> quote> echo has a newline'
> zsh% this_has_a_newline
> this
> has a newline

Thanks. This works fine -- all I wanted was to be able to do something like
hit 'c <return>' to clear the screen and have a filenames-only listing of
the current dir at the top of the screen.

> Same thing should work for any control sequence; just put it in quotes.

I was wondering more about what chars you'd use within an alias to represent 

> Notice that in the sample above the newline was taken as a command
> separator.  That's probably not what you mean, but since you didn't
> say why you want to include a newline or control ...

Well, it serves the purpose. If there's a better way, I'd be glad to hear
that, too. 

                              // rusty@xxxxxxxxx //

                Intelligent people laugh quickly and smile slowly.
                      -- Malcolm de Chazal   Sens-Plastique

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