Re:Advancing in the Bash Shell
by aardvark179 on Tuesday September 13, 2016 @03:31PM
(#12491450)
Enacs can be set to handle history substitution itself in various ways (the idea being that it can record an accurate history even when your shell can't). There's an option to configure if and when it does this, which you may want to set to never.
Neither do I, intentionally at least.
This week I encountered a very bizarre problem when running GHCi (a Haskell REPL), invoked from bash in an Emacs "shell" buffer.
In Haskell, "!!" is a function for getting an element from a list, e.g.
This would normally return the pair ("b", "c"), which GHCi prints to the screen. However, for some reason it was performing bash-like subtitution, giving me (on subsequent retries): and so on exponentially!