|
Re: bash: History substitution doesn't happen after ^V^J.: msg#00284shells.bash.bugs
Hi Chet, > > $ echo !$<Return> > > foo > > $ echo 'a^V^J > > b' !$<Return> > > a > > b !$ > > $ > > History expansion is done on a per-line basis, not per-token. It is > performed before the shell parser sees the line. OK. > At the point the second line is read and history expanded, the > parser's state is still `open single quote', so expansion is > inhibited. I understand. > I'd rather err on the side of not performing history expansion where > it could possibly be done instead of performing it when it should not. Couldn't we pick the middle ground and do it when it's right and not when it's not? :-) That $ echo 'a b' !$ $ echo 'a b' !$ produce different results seems to be a bug, even if it the behaviour is understandable. There's already quoted-histchar-checking present that stops expansion: $ echo foo foo $ echo !$ \!$ 'a !$ b' \ > !$ z foo !$ a !$ b z $ Wouldn't it just be in the in-quoted-string state at the beginning of line two but leave that on encountering the close quote? I've no patch to provide, but I'd rather see this left open as a bug to be fixed one day rather than closed under `as designed'. Cheers, Ralph. |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | bash incorrectly calls completion function in certain circumstances: 00284, ian |
|---|---|
| Next by Date: | Order Rolex or other Swiss watches online: 00284, Charlene Riddle |
| Previous by Thread: | Re: bash: History substitution doesn't happen after ^V^J.i: 00284, Chet Ramey |
| Next by Thread: | A message From: Rev. Johnson Weh Urgent: 00284, Weh |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |