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
[BUG] - prompt not showing due to terraform plugin #2598
Comments
What does that look like? |
hey @romkatv thanks for answering at those times, when I start a terminal it remains blank if I open a different shell (bash or fish), and from there I try to run adding first I disabled so, following a hunch, I did a search in p10k config file, found |
Can you confirm that without terraform everything works but with terraform zsh hangs on start? If you try 3 times each, does it reproduce 100% of the time? |
I'll try to reproduce this and collect data to do better debugging. |
Nothing in particular. Just a clear cause and effect: when I do X, Y happens, 100%. |
@romkatv it happened again While In the I added From
CTRL+C does not work. Only a Full output: Then I comment the This time when running Full logs: If I uncomment the line, |
Thanks for the extra info. It looks like zsh hangs trying to resolve zsh -fc 'set -x; : $TF_DATA_DIR; \ls -ld -- ${TF_DATA_DIR:-.terraform}; : ${${TF_DATA_DIR:-.terraform}:A}' You need to run this from the same directory in which you ran your previous tests when zsh was hanging on start. What does the command print? Does it hang? |
@romkatv I've run Here it is your command in the home dir: ❯ zsh -fc 'set -x; : $TF_DATA_DIR; \ls -ld -- ${TF_DATA_DIR:-.terraform}; : ${${TF_DATA_DIR:-.terraform}:A}'
+zsh:1> :
+zsh:1> ls -ld -- .terraform
ls: cannot access '.terraform': No such file or directory It hangs here. But I can cancel with CTRL+C. Btw, it makes sense not to have the |
This is fascinating. Does the following command also hang? zsh -fc 'cd && : ${${:-blah}:A}' |
Today I started the laptop and is a day in which this is working. ❯ zsh -fc 'set -x; : $TF_DATA_DIR; \ls -ld -- ${TF_DATA_DIR:-.terraform}; : ${${TF_DATA_DIR:-.terraform}:A}'
+zsh:1> :
+zsh:1> ls -ld -- .terraform
ls: cannot access '.terraform': No such file or directory
+zsh:1> : /home/jdelacamara/.terraform
❯ It does not hang and return to the prompt. Right now, the last command you sent also is working. I'll do the same test when the problem shows up again. Meanwhile, let me know if you think I can perform more tests. Thank you! |
I don't think you need to perform any more tests. The previous test (#2598 (comment)) indicates a very serious issue with your machine: |
So, can I do something? |
If my diagnosis is correct, your machine has very serious issues. They aren't confined to terraform. Either the OS or the filesystem is malfunctioning. |
@romkatv as per your diagnosis, I'm trying to find what problem I have (before go and reinstall).... I found the point in which it breaks is in file _p9k_read_word ${${TF_DATA_DIR:-.terraform}:A}/environment && ws=$_p9k__ret under function I tried this in the file: local TFDD=${TF_DATA_DIR:-.terraform}
local TFDD2=${TFDD:A} ...and it fails anyway in the second line. I'm trying to figure it out, but I left the comment here just in case you have an idea. I created the Thanks. |
I've misread #2598 (comment). Specifically, I've missed "not" in "It does not hang". Thus, my saying that you machine has a serious issue was false. In your last command you say "breaks" and "fails". Do you mean "hangs" in both cases? |
Randomly prompt is not shown with zsh+ohmyzsh+powerlevel10k
What?
I'm using
zsh+ohmyzsh+powerlevel10k
on a Manjaro.The problem is that from time to time shell doesn't show the prompt.
This is fixed after a couple of restarts.
Other shells start well.
Possible cause
If I remove the Terraform plugin from powerlevel10k it starts.
I'm removing it from
.p10k.zsh
fromPOWERLEVEL9K_RIGHT_PROMPT_ELEMENTS
variable.Request for help
I am not sure how to dig into this to find the root cause. Could you guide me on how to debug this so I can find a fix?
Workaround
For now I have it deactivated.
Other info
❯ uname -a Linux tufmanjaro 5.15.148-2-MANJARO #1 SMP PREEMPT Sat Feb 10 11:45:52 UTC 2024 x86_64 GNU/Linux
I have installed these packages:
extra/zsh 5.9-4
aur/zsh-theme-powerlevel10k-git r3918.25e5f59-1
The text was updated successfully, but these errors were encountered: