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
rxvt-unicode & zsh left & right prompts get messed up... #405
Comments
TERM inside and outside tmux?
|
I open the terminal urxvt then I type tmux. Then at the prompt, that first screen shot I showed in the first post above, I just hit my windows key and spacebar key a few times fast, that I use to resize a window, and the terminal/tmux and looked like that. So the terminal prompt gets messed up if I resize... Now I created a few panes; http://i.imgur.com/mptt0HE.jpg Then I closed one and now you can see the multiple prompts it created; http://i.imgur.com/w73RxOt.jpg Of those 4 prompts, the bottom one does work... |
Right, but this is just restating the problem. What is TERM set to echo $TERM Both before you attach tmux and after you attach tmux. On Thu, May 12, 2016 at 09:37:32PM -0700, Geyup wrote:
|
Before running tmux; Running tmux; So if I'm running rxvt-unicode as my terminal, then at the prompt type |
Is this correct for me to add to the .tmux.conf?
After placing that option in the config, when I close a pane, I'm not seeing the multiple prompts being created, maybe this fixed it. But if I resize the the window with my shortcut keys it's still messing up the prompts, like the first screen shot in the first post... I also noticed something else, when I created one pane look at this screen shot below and notice the 2 prompts on the left; http://i.imgur.com/sjioDuT.jpg Now I close the pane and see how it changes, this is how the prompt first looks when I change cd /var/log this no longer appears and the middle of the screen shows the right side prompt in it, which also doesn't appear in the first screen shot above. http://i.imgur.com/oIy73Ut.jpg So things are still shifting around, and this is the first I've noticed that a command I typed before, when created a new pane disappears.... hmm |
No TERM must be screen or tmux inside tmux.
|
ahh ok, I'll remove that option out of the config. Please look up at my last reply, I was editing it over, some other issues too... thanks |
There is no such thing as right-justify in terminals, when you close a pane, a prompt that was at column 20 will stay at column 20 even if the terminal is now 50 columns wide, unless the shell redraws it and most shells will only redraw the current line. |
right-justify, a prompt on the right side? |
It is only a prompt on the right side while the shell is redrawing it on right-justify, a prompt on the right side? — Reply to this email directly or view it on GitHub |
Ok... Well this right side prompt is driving me crazy, so I figured I'll get rid of it and only have everything on the left and problems all solved! But Here's a screen shot with 3 panes open and just a left side prompt; http://i.imgur.com/dTbJ48q.jpg Now I noticed if I do something in each pane, and then close one I was only getting one extra prompt to appear, but to my http://i.imgur.com/DhpaD9o.jpg I just don't get what's bloody going on here... arghhh :( Does it help for you to see the .Xdefault settings I have for rxvt-unicdoe, and the .zshrc for the shell? |
Is it showing multiple prompts after you resize or when you first create a
|
I didn't resize it, just left it all max size when I was creating and killing panes. I've also been running it max size over a few times, trying to recreate the massive amount of prompts, but now it's only creating one extra, not sure what caused it to create so many... hmm |
I just resized it and it got all screwed up; http://i.imgur.com/2cMvF40.jpg So having the right side prompt is not the issue... hmm |
Are you sure these prompts weren't in the history? Had you typed anything
|
No I was always opening the term for the first time, and some times I typed something at the panes, and at other times I typed nothing... According to #!/bin/sh I was thinking maybe this dameon way of running it was the problem, so I just ran only |
All along I use to think this was some rxvt-unicode issue, from some things I was seeing in it before, compared to xterm. I just tried xterm with the left prompt only and I'm getting the same results, multipile prompts being created. This seems to be some issue with zsh and tmux? hmm |
I just changed my shells to bash and I don't get any of these problems... Hmm there is something going on with zsh and tmux... Here's my .zshrc config; |
I don't know anything about zsh. |
Are you a developer, or the developer of tmux? |
Geyup, I just tried to replicate the issue with your zshrc and it worked So the issue here doesn't lie with tmux but either with your zsh, your |
I wouldn't actually say This could also be related to something going on in X, and I use Nvidia, so something might be effecting this with nividia drivers and transparency in rxvt-unicode. I can replicate this problem on my desktop if I use I also read online about this redraw of multi prompts in zsh as an issue that has been dated back to 2009, so not sure. I've made some slight changes to my .zshrc, so maybe someone can look them over to see if they see any errors... |
If I remove everything from .zshrc and only leave this one prompt option;
Then when I run tmux and resize it with my shortcut keys I only get one additional prompt to appear, and then when I close/kill panes in tmux, I also only get one additional prompt. From what I read this is suppose to be normal behaviour, as the window changes, zsh redraws, this is my understanding to see it just once like this. Seeing more then one additional, I believe there is something in my .zshrc causing this, but if I should not see any additional prompts created, I'm not sure then... I also left both prompts as the only options in the .zshrc and I see the problems again.
Again, so I'm clear here, there was only these 2 prompts options in the .zshrc, nothing else, and I see the problems, so then what could be wrong with these prompt options? Hmm |
Try replacing your colour escapes with ones from the zsh color module: |
For the color escapes you mean like this?
If this is what you mean by the colors, it's not working... I don't think this is any mistake I've made. zsh comes with it's own prompt themes which are listed for me under; /usr/share/zsh/5.2/functions These are just two of them as example on my box with zsh 5.2; /usr/share/zsh/5.2/functions/prompt_zefram_setup Even if I strip everything out of the .zshrc and only leave in these settings, autoload -Uz promptinit I still see the redraw of one additional prompt if I resize tmux or close a pane, looking like below as example; foo@host If I had this same problem on the desktop, then it would seem clearer to me that this is my settings wrong, only happening in tmux seems to be an upstream bug... |
@foxundermoon I'm not 100% sure, but it certainly seems like a bug with tmux, because I do not see the problem on the desktop, only in tmux... @ntnn can you please paste your .zshrc? Since you said you did not have this problem I'd like to try yours and see what happens. |
@ntnn # Path to your oh-my-zsh installation.
export ZSH=/Users/fox/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
#ZSH_THEME="robbyrussell"
ZSH_THEME="agnoster"
# ZSH_THEME="powerline"
POWERLINE_NO_BLANK_LINE="true"
# POWERLINE_RIGHT_A_COLOR_BACK="yellow"
# POWERLINE_RIGHT_A_COLOR_FRONT="red"
# POWERLINE_RIGHT_B="hello"
# POWERLINE_RIGHT_A="none"
# POWERLINE_DISABLE_RPROMPT="true"
# POWERLINE_SHOW_GIT_ON_RIGHT="true"
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion. Case
# sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git autojump incr history go docker gradle gulp node npm osx adb brew)
# User configuration
PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
# export MANPATH="/usr/local/man:$MANPATH"
JAVA_HOME=`/usr/libexec/java_home`
export JAVA_HOME
GRADLE_HOME="/usr/local/Cellar/gradle/2.13"
export GRADLE_HOME
ANDROID_HOME="/users/fox/dev/android/sdk"
export ANDROID_HOME
export PATH
export GOPATH="/Users/fox/dev/go"
export EDITOR='vim'
export NVM_DIR="$HOME/.nvm"
PATH=$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH:$GOPATH/bin
source $ZSH/oh-my-zsh.sh
PS1="$PS1"'$([ -n "$TMUX" ] && tmux setenv TMUXPWD_$(tmux display -p "#D" | tr -d %) "$PWD")'
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='vim'
else
export EDITOR='vim' #mvim
fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# ssh
# export SSH_KEY_PATH="~/.ssh/dsa_id"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
#
launchctl setenv PATH "$PATH"
launchctl setenv ANDROID_HOME "$ANDROID_HOME"
launchctl setenv JAVA_HOME "$JAVA_HOME"
launchctl setenv NODE_PATH "$NODE_PATH"
launchctl setenv GRADLE_HOME "$GRADLE_HOME" |
all about of tmux config
and this is my .tmux.conf.local
|
Ah ye sorry, forgot about this thread. My zshrc is here: |
@foxundermoon Did you try it without omz and powerline, both and |
when i turn off the .tmux.conf.local
so this issus not appear again |
@ntnn thanks, but it doesn't matter, I can place one line for only a prompt in the .zshrc and it still makes several prompts. There's a bug in tmux, and I give up for now... |
Seems like most of aforementioned problems are related to #516. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I'm using 2.2 in Slackware with rxvt-unicode and zsh.
Ive noticed a few things happening that do not occur when only using the terminal on my desktop, this is only happening in tmux.
I use a left & right side prompt and I have shortcut keys set to resize a window to full size and then back to it's original size. When I do this several times the left prompt will appear in the middle of the screen and the right side prompt sometimes will get cut off on the right side.
Below is a screen shot of this;
http://i.imgur.com/6AF8La8.jpg
Also when I have several panes open and then close one, several prompts will appear like this sometime, with the bottom one still working;
The text was updated successfully, but these errors were encountered: