On 12/22/09 5:18 PM, Jonathan Claggett wrote:
> Hi all,
> 
> I'm not sure if this is a bug or not but it certainly caught me by surprise.
> I accidentally created an alias ending with a backslash and a newline today
> and the resulting alias proceeded to grab the text on the line _after_ I ran
> it. For example:
> 
> *$* echo $BASH_VERSION
> 4.0.33(1)-release
> *$* alias x='echo \
> *>* '
> *$* x
> *$* Hello, World!
> Hello, World!
> **
> Is this delayed response expected?

I would think so, since you've inserted a command continuation (the escaped
newline) into the command via the alias.  It's the same as if you had typed

*$* echo \
*>* Hello, World!

The only unexpected part is the re-issuing of $PS1 as opposed to $PS2.
I'll have to take a look at that.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/


Reply via email to