Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14464 > unrolled thread

Re: History expansion in multiline string, within single quote

Started byChet Ramey <chet.ramey@case.edu>
First post2018-08-09 10:32 -0400
Last post2018-08-09 10:32 -0400
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: History expansion in multiline string, within single quote Chet Ramey <chet.ramey@case.edu> - 2018-08-09 10:32 -0400

#14464 — Re: History expansion in multiline string, within single quote

FromChet Ramey <chet.ramey@case.edu>
Date2018-08-09 10:32 -0400
SubjectRe: History expansion in multiline string, within single quote
Message-ID<mailman.4905.1533825191.1292.bug-bash@gnu.org>
On 8/9/18 3:47 AM, schplurtz@laposte.net wrote:

> Bash Version: 4.4 
> Patch Level: 12 
> Release Status: release 
> 
> Description: 
> Bug happens in an interactive shell. 
> 
> this works as expected, no history expansion : 
> echo "foo"'!bar'"qux" 
> 
> but this fails, bash tries to hist-expand !bar', which it should not. 
> echo "foo 
> "'!bar'"qux" 
> 
> -bash: !bar': event not found 
> 
> I just compiled bash 4.4.18 and tested, the bug is there too. 

Since the history library is explicitly line-oriented, and independent of
the shell, there hasn't been a clean way to inform it about any quoting
state the current line should inherit.

I added an experimental new state variable that will appear in
readline-8.0-beta that should allow applications to communicate this
state to the history library. We'll see how it works.

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

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web