When I use tmux at my terminal, my zsh show blank line on bottom.
I can't find any wrong with my zshrc .
Can anybody help me solve my problem?
Related
I wanted to change the theme of my oh my zsh terminal in the .zshrc-file. When I tried to do that it didn't register and gave me an Error-message which I wasn't able to reproduce. Now I just have this weird Lock in my Terminal. Does somebody knows what it means / how I can get rid of it?
Zsh Terminal Screenshot
So I recently decided to change my bash prompt and I have a problem. After pressing up arrow a few times so I don't have to write the command I used like a minute ago the command suddenly breaks the whole prompt and the characters are randomly shattered.
I added this to my bash profile:
export PS1="[\e[32m]\u[\e[m]#[\e[32m]\s[\e[m]-[\e[32m]\W[\e[m] >> "
After pressing the up arrow like two or three times, the characters become totally scrambled like this:
do nano ~/.bash_profile-[]Downloads[] >> source ~/.bash_profile
pwd sudo nano
~/.bash_profile
Guys please help me, it's really annoying. Thanks.
Already answered in comments. Here is the answer:
You need \[...\] around non-printing characters, not [...]. That's why you have a bunch of [] scattered throughout your prompt.
Thanks
I tried to use someone else’s ZSH config. It added a newline before the first prompt. I didn’t like it and switched to spaceship, but it still lingers. Here’s the image:
Any ideas? I don’t have any prompt newline config in my zshrc.
I am new to Bash and just set my own terminal theme. However, when I typed a long command, the command line overlapped in one line instead of wrapping into two. I looked up for solutions and solved the problem by making sure I added \[...\] when using non-printing characters in a bash prompt. Yet, when I move up and down my cursor on previous command line, the command line still overlaps like this:
katnano .bash_profile
while normally it should be:
katrinachan#katrina :~$ nano .bash_profile
My .bash_profile looks like this:
export PS1="\[\e[1;38;5;73m\u#\h\e[m\] :\[\e[1;38;5;214m\W\e[m\]\$ "
export CLICOLOR=1
export LSCOLORS=Cxfxcxdxbxegedabagacad
May I know what I am missing in my .bash_profile file? Thanks
[Solved]
Thank you! It works perfectly. Now my code is:
export PS1="[\e[1;38;5;73m]\u#\h[\e[m] :[\e[1;38;5;214m]\W[\e[m]\$ "
export CLICOLOR=1
export LSCOLORS=Cxfxcxdxbxegedabagacad
The overlap problem doesn't exist anymore.
The \[...\] should only bracket sequences which do not involve cursor movement on output. You have the \u#\h\e sequence inside these brackets where obviously it should be outside.
When I type in a command in MobaXterm, the first character of my prompt shows up at the end of the next line, and the rest of the prompt is on the line after. It doesn't seem to affect anything performance-wise, but I can't seem to find anyone else with this issue. If anyone has any ideas as to what might be causing this, some help would be much appreciated.
screenshot of my terminal
On a MobaXterm window, Click on Settings->Configuration and then in the Terminal tab un-select Display separation line.
Click here for a picture
This is not due to a setting in MobaXterm, but rather it is due to the default prompt set in the version of bash cygwin installed by MobaXterm, which adds a newline.
You can change the prompt by setting PS1 in ~/.bash_profile (or if you set it up ~/.bashrc). For example I add this line and now there is no newline at the prompt:
PS1="\h [\e[33m]\w[\e[0m]> "