Open NicholasBHubbard opened 3 years ago
Hi!
I haven't been able to reproduce your problem. emacs-bash-completion does modify the shell prompts temporarily, so it is possible that something went wrong and that the prompts were not set back to their original value, as they should have been.
All I can offer you at this point is a workaround. I think that if you call:
(set bash-completion-use-separate-processes t)
just before bash-completion-setup, you won't have that problem anymore. That's because it switches bash completion to a mode that doesn't need to change the prompt at all, as it creates a separate process.
I suspect that there's something in your bash configuration or system that is causing this issue. It might not be necessarily linked to the bash prompt; it could be many things, unfortunately.
If you have the time, it would be very nice if you could try the following:
PS1="\s-\v\$ "
then press returnPROMPT_COMMAND=""
then press returnset -x
in the shell, then press returnAnd add to this issue the content of:
On my test machine, the shell buffer looks like the following at the end:
bash-5.1$ PS1="\s-\v\$ "
bash-5.1$ PROMPT_COMMAND=""
bash-5.1$ set -x
bash-5.1$
++ __emacs_complete_recover_prompt
++ local r=0
++ PS1='\s-\v$ '
++ PROMPT_COMMAND=
++ unset __emacs_complete_ps1 __emacs_complete_pc
++ [[ -n '' ]]
bash-5.1$
bash-5.1$
I'd be interest in seeing any differences.
This is from a plain shell mode. Please note that I have not configured my bash prompt in any way for this example. (I get the same behavior with my regular prompt)
As you can see the commands are still being entered but there is just no prompt. If I kill the shell and start a new one I get the same behavior over and over.
This behavior is totally fixed if I do not use bash-completion.
The only configuring I have done is this:
I am using Emacs 27.1