This has driven me crazy for a long time; I wonder if there is a way to fix it? Hopefully I can describe the situation well.
For simplicity's sake, say I've got the following directory structure: ~jer/dirA and ~jer/dirB
Within a shell within emacs, I start off in my top-level directory (~jer), type 'cd dir', and hit tab.
My window splits in 2, and I've got a *Completions* buffer. This is cool; I see that my choices are 'dirA' and 'dirB', I type an 'A' (so my full command is 'cd dirA') and hit enter, but the *Completions* buffer stays open and I have to manually close it (generally with 'C-x 1' because I'm in the shell buffer that I want to save, but if I already have a split window this is even more annoying, because the *Completions* buffer takes the place of the other one that was already there, and I have to switch to that one and hit C-x k to manually kill it).
So my question: is there a way to make the *Completions* die automatically once I finish my command? In the example above, as soon as I hit enter after typing 'cd DirA' I would want the buffer to be killed.
Thanks, and I hope this makes sense. Note, I don't think this is a duplicate of Is there any way to automatically close filename completetion buffers in Emacs?, because that's about using find-file (and in that case the *Completions* buffer does close.