bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mulit-line aliases and PROMPT_COMMAND


From: Chet Ramey
Subject: Re: Mulit-line aliases and PROMPT_COMMAND
Date: Thu, 2 Jun 2016 18:57:42 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.1.1

On 4/20/16 4:41 PM, Grisha Levit wrote:
> Since bash 4.3 multi-line aliases interact very strangely, especially in 
> connection with PROMPT_COMMAND.

And you're the first person to report them.  I guess there aren't a lot of
multi-line aliases out there.

> 1. PROMPT_COMMAND is executed after every line in the alias, rather than just 
> before the prompt is drawn:
>  
> 2. If PROMPT_COMMAND contains a command substitution (even one that is not 
> executed!) then only the first line of the alias is executed

These two are the same problem.

> 3. If an alias contains a command substitution (this is regardless of 
> PROMPT_COMMAND being set) something really non-sensical happens.

This one actually took some time to track down.  All of these will be fixed
in bash-4.4.

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]