bug-bash
[Top][All Lists]
Advanced

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

Re: History modifier :p ignored prior to another history reference


From: Chet Ramey
Subject: Re: History modifier :p ignored prior to another history reference
Date: Sun, 8 May 2016 20:13:42 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.0

On 5/5/16 2:08 PM, Piotr Grzybowski wrote:
> Hey,
> 
>  confirmed, this is what happens by construction.
>  this one is going to be tricky, expansion happens on the shell line, way 
> before it comes to execution. I do not see reparsing again at execute_command 
> even if we had means, which we dont, to store the information from history 
> expansion to know what to execute and what not. Re-tokenizing by rules of 
> history expansion anywhere outside histexpand seems out of place as much as 
> implementing shell lexer (again) in histexpand. Maybe splitting in 
> history_expand and returning tokens with options, that are later put together 
> for execution? Either way seems a bit large. 
>  Currently the design indicates: :p applies to the whole line.

Yes, the behavior as inherited from csh and tcsh should be that :p in any
history expansion on the line will apply to the entire line.  It's an
easy one-character fix.

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



reply via email to

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