-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shell buffer get polluted when completing by TAB #21
Comments
So if I understand, you have two line prompt like this: User@macOS: ~ (python-3.8.13)
$ yes > and when you try and complete on |
@CeleritasCelery Hi, I do have a two line prompt(The second line ends with '$'). But the 'yes' part is a shell command.
Yes. But the issue seems happen only when with output redirection like '> /dev...'. |
So I think there are two separate issues here (correct me if I am wrong). The first is that the prompt is being reprinted and the second is the output is going to the buffer. For the first, look at this part of the docs and #5 : prompt components in completion list Also what shell are you using? Is this bash or zsh? |
Yes.
I'm using I remove the fancy settings from (setq native-complete-style-regex-alist '(("[-.a-z0-9]+\\$ " . bash))) Updated: The example in README also causes this issue for me. I don't see the shell prompt is showing up as completion candidate. |
Okay, I am using the same shell and and OS as you. Have you run |
Hi, it says |
Thanks. So to make sure I understand, the issue you are seeing is that the completions for |
Sorry, I should have be more clearer.
My original issue is, although the mini buffer is pop up properly, the prompt or the candidates are inserted into the shell buffer. The first time I press TAB, the prompt is inserted, and the buffer becomes
The second time I press TAB, the candidates are inserted, and the buffer becomes
In both case, the mini buffer is pop up properly.
When I test the example in RAEDME with a plain |
Okay, let's solve the issue with the plain prompt first. Does this only happen with the very first prompt or does it happen every time? (for example if you start a new shell and press enter a few times then try completion does it still duplicate the prompt?) |
It's
|
I also tried to remove |
hmm, I am not sure what the issue could be. Can you run this command in your shell?
That will tell us if it the redirection or something shell specific. |
When one press TAB in (! means cursor) a shell buffer with the following input
the buffer content becomes
then choose
dev
in mini buffer, and enter/
then press TAB again with the following content in the bufferthe buffer content becomes
Test config:
The text was updated successfully, but these errors were encountered: