GNU bug report logs -
#7883
[PATCH] comint history expansion fails to process :N or $ modifier
Previous Next
Reported by: Roland McGrath <roland <at> frob.com>
Date: Fri, 21 Jan 2011 18:22:02 UTC
Severity: normal
Tags: patch
Merged with 8000
Found in version 23.2
Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Bug is archived. No further changes may be made.
Full log
Message #18 received at 7883 <at> debbugs.gnu.org (full text, mbox):
> This just undoes the fix installed for
>
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=1795
>
> (Although it wasn't really fixed anyway.)
The change was not a fix for that problem at all, as you say. That problem
continues to exist in various forms (that also exist in v22) and is a bug
in entirely different parts of the code. I noticed the gratuitous
insertion of spaces long ago, but it didn't really irk me quite enough to
look into it. I see no reason whatsoever why expansion should be looking
for metacharacters and fiddling things around like that at all. I always
assumed it was a dismally misguided attempt at pretty-printing, which, even
it weren't completely broken (as it is), is not a proper thing to be doing
implicitly during history expansion at all.
This misfeature appears to be fixed by:
(setq comint-delimiter-argument-list nil) ;buffer-local
The buffer-local setting comes from the global value of
shell-delimiter-argument-list, which I've just set to nil in my init files.
I really can't tell what the thinking behind the default setting of that
was, since it's not commented particularly well. It seems just entirely
wrong-headed to me. As far as I can tell, the only uses of the things it
affects (comint-delimiter-argument-list, comint-arguments, comint-args)
are in this history expansion stuff, where it is just thoroughly wrong if
you either want to have history expansion work anything like it does in
the shell (which is largely immune to any details of shell syntax, though
bash's is not so immune to quoting as is csh's, which is the original and
One True definition of ! history's meaning), or you know much of anything
about shell syntax.
Thanks,
Roland
This bug report was last modified 14 years and 96 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.