-
Notifications
You must be signed in to change notification settings - Fork 84
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
zsh prompt char disappears with set-option -g default-command "reattach-to-user-namespace -l zsh
#48
Comments
I could not reproduce anything like that until I did a Using script to capture the escape sequences, you can see the prompt being printed multiple times (once as normal, once more due to your
I found that the problems does not occur with Overall, relying on KEYMAP in PROMPT seems likely to be pretty fragile since KEYMAP only seems to be set in contexts created by zle. You kind of force that with your |
Not sure why I see this in |
Barring a clean solution, I can make use of fine-grained solution options detailed in However, anything launched from within it, Edit: this would avoid having Edit 2: incidentally, if I'm in a git controlled dir in |
Odd. Being in a tmux session never made a difference for me (with or without launching the shell through the wrapper). The only thing that triggered the problem for me was being in a “dirty” Git working tree and running zsh 5.1.1. Any of 1) being outside a Git working tree, 2) being inside a clean Git working tree, or 3) running zsh 5.0.8 avoided the problem that I was able to reproduce. Are you sure that you are using the same zsh version in all your contexts? When I use this prompt:
I see Playing around a bit more, I found something else that fixes the problem in my replication setup: replacing Can you put together a minimal configuration (e.g.
|
Over at 'pure' issue tracker, your first reply here resulted in the following, which seems to fix the problem:
Do you see any issues with such a solution? |
That seems like a good workaround. It fixes the problem that I was able to reproduce. When using zsh 5.1.1, KEYMAP is still unset during pure’s async-triggered multi-line redraw, but the intermediate |
Thank you for you help! |
I just noticed that I lost visual select mode when in normal mode. I can yank word object and paste it, but not visually select some parts of a line and yank. Could that be due to the prompt related code? |
Is that something to do with zle’s vi mode? I do not use that. What key strokes (or mouse actions?) do you use? It is reproducible in a minimal configuration that I can easily setup in an alternate ZDOTDIR? And no, I would not expect normally expect the PROMPT to affect editing modes. |
Yes, it is related to zle's vi mode. Following your advice, I created Also, in With this last A bit of investigation led me to this in zle manual, which might confirm that I was not seeing things: The parameter zle_highlight is also used by the line editor; see Character Highlighting. Highlighting of special characters and the region between the cursor and the mark (as set with set-mark-command in Emacs mode, or by visual-mode in Vi mode) is enabled by default; consult this reference for more information. Irascible conservatives will wish to know that all highlighting may be disabled by the following setting: There's also discussion of vi visual mode in I understand that I'm totally off the original subject, and appreciate your help. |
I'm using pure prompt with this
.zshrc
.Adding
set-option -g default-command "reattach-to-user-namespace -l zsh
to my .tmux.conf makes the prompt char❯
disappear intmux
zsh session.There is no problem with the prompt outside of
tmux
. Why would this happen?OSX 10.9.5, zsh 5.2 (x86_64-apple-darwin13.4.0)
The text was updated successfully, but these errors were encountered: