-
Notifications
You must be signed in to change notification settings - Fork 422
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
K8s contexts breaks line wrapping in console #703
Comments
This seems similar or even related to #511 and #547. Look specifically at 547, I have put a lot of effort into tracking that one down. I'd love to squash all these bugs at once. I cannot reproduce this. Please provide some specific reproduction steps, like the actual command you use to break the prompt, and the output of And what happens if you set |
I am not sure why I would set LP_MARK_KUBECONTEXT= to any other ASCII character, but when I try setting it to "o" for example, then nothing works, presumably because the config doesn't compile. I can reproduce this by simply enabling the kubernetes context and (and having a cluster configured) and then typing anything that is longer than the line. Here is a screenshot: |
To test if the default character,
That does not make any sense. You can set A screenshot isn't very helpful, I understand what the issue is. But if I can not reproduce it and/or boil it down to the simplest reproduction steps, I can't fix it. So again, please help provide some specific reproduction steps:
|
Apologies, I confused LP_MARK_KUBECONTEXT with LP_ENABLE_KUBECONTEXT. I will try out the suggestion and report back. |
I still can't reproduce this, even with the same Bash version. I'm going to need more info:
|
This is using the terminal emulator Terminator v2.1.1
|
Was finally able to get Terminator to build (man that was a pain. The install docs are terrible, and the Python ecosystem is just the worst right now). So running on Terminator 2.1.1 and Bash 5.1.16, I am not able to reproduce this. I guess the next thing to try is an Arch Linux VM? I am not sure that will help though. I'm guessing it is something environment specific, or maybe readline version based? Try running Bash with nothing loaded with |
K8s contexts breaks line wrapping in console. For example, if you have a long multi-line command in your history, and you press Up arrow to retrieve it, the multi-line will be written onto a single line that wraps back onto itself. This can be reproduced. It is probably due to the length of the prompt not being known by bash due to incorrectly escaped characters in the K8s context prompt text.
Disabling K8s context by setting LP_ENABLE_KUBECONTEXT=0 fixes the issue.
Shell:
[natehouk:~] $ echo $BASH_VERSION
5.1.16(1)-release
Operating system:
[natehouk:~] $ uname -a
Linux polar 5.17.3-arch1-1 #1 SMP PREEMPT Thu, 14 Apr 2022 01:18:36 +0000 x86_64 GNU/Linux
[natehouk:~] $ lsb_release -a
LSB Version: n/a
Distributor ID: Arch
Description: Arch Linux
Release: rolling
Codename: n/a
Liquidprompt version:
f6a841c
Steps to Reproduce
Expected Behavior
Line wrapping should not be broken. Multi-line command should be printed on multiple lines and not have unexpected behavior when moving through the command with the cursor.
Current Behavior
Multiple lines are printed incorrectly on a single line.
Possible Solution
Correct escaping in K8s context prompt text.
The text was updated successfully, but these errors were encountered: