-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Paste fails when using bracketed-paste-magic #102
Comments
Sounds good, let me know when you have more details. |
I confirm the problem on zsh 5.2 within tmux 2.1 on Arch Linux x64, with oh-my-zsh and a few plugins (full configuration details at #101 (comment) ). "When I paste anything to the terminal, nothing visibly happens. Terminal stops accepting an input until I ctrl-c at which point I get a new prompt" is my exact problem too. |
Does this problem go away when you disable the autosuggestion plugin? |
@ericfreese yes. it only happens with the combo of zsh-autosuggestion, oh-my-zsh and zsh 5.2. In my experience, switching to zsh 5.0.8 or not using oh-my-zsh or turning off zsh-autosuggestion all fix the problem. |
Yes too. |
@ronjouch Do you still have this problem now that you're no longer using |
Yes. Additional data point: problem doesn't happen out of tmux. To recapitulate all that I know,
if [[ -z "$TMUX" ]] ;then
ID="`tmux ls | grep -vm1 attached | cut -d: -f1`" # get the id of a deattached session
if [[ -z "$ID" ]] ;then # if not available create a new one
tmux new-session -d zsh
tmux split-window -h
tmux select-pane -L
tmux resize-pane -Z
tmux -2 attach-session -d
else
tmux attach-session -t "$ID" # if available attach to it
fi
fi |
EDIT: what's below worked around the problem on my work machine (Ubuntu 14.04LTS, zsh 5.2, tmux 2.1), but the problem persists on my home machine (Arch Linux, zsh 5.2, tmux 2.1) @ericfreese got it! At line 4 of my tmux startup script above, I do if [[ -z "$TMUX" ]] ;then
ID="`tmux ls | grep -vm1 attached | cut -d: -f1`" # get the id of a deattached session
if [[ -z "$ID" ]] ;then # if not available create a new one
tmux new-session -d zsh # <-- here be dragons ----------------------------------
tmux split-window -h
tmux select-pane -L
tmux resize-pane -Z
tmux -2 attach-session -d
else
tmux attach-session -t "$ID" # if available attach to it
fi
fi If instead of
@SeanTAllen you haven't mentioned tmux so far, but could you be in a similar position ("nested" zsh instances, not sure "nested" is the right word) |
I have the same problem, without tmux. Plugins: |
@Minizarbi I narrowed down on my case and precised what's wrong for me a few seconds before you posted, can you check if your case could relate to mine in some way? ("nested" zsh instances, not sure "nested" is the right word) |
I can't answer you certainly, I think it's a nested zsh instance, I have not really starting script so I can't change the script, and it worked without zsh-autosuggestions. |
I also have this issue with |
Update: my comment above ( #102 (comment) , fiddling with |
@ronjouch i'm not using tmux. |
Yeah, I noticed I'm having the problem too on my home machine, both in and out of tmux :-/ . I updated my case at #102 (comment) |
I'm not aware of any "nested zsh" problem. unless there is one in oh-my-zsh. I'm not starting any other shells that i know of, i'm not using tmux or anything else. |
Removing this code from oh-my-zsh's
I need to test further. |
Solves the problem for me too! |
Ok, specifically, it is just this:
bracketed-paste-magic appears to be causing the issue. @ericfreese I'm really new to zsh so I don't know why they would interact poorly. I hope though that this is enough for you to go on. Please let me know if you need me to do any testing, change anything etc to get you more info. |
@SeanTAllen @ronjouch This is great! Thanks for digging so deep into this. I'll see what I can do with this new info. |
This is the minimal autoload -Uz bracketed-paste-magic
zle -N bracketed-paste bracketed-paste-magic
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh Trying to paste into the command line gives the error:
Edit: Updated for v0.2.0 |
Whew! After digging into the guts of
|
Until we get to the bottom of who's at fault here, setting
So, for example, here's a minimal
|
@ericfreese thanks for following up and documenting the issue+workaround in README 👍 Just migrated my |
It works for me too ;) |
I believe v0.2.6 should no longer require the workaround. Please give that a shot. Edit: v0.2.6 had a typo. Try v0.2.7 |
@ericfreese confirmed! v0.2.7 seems to be the golden release ^^. Thanks for keeping up with the issues. |
Hi, I followed the instructions at https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md#oh-my-zsh Pasting is slow, but
solves it. I thought v0.2.7 and above don't require this workaround, but I use v0.5.0. |
Confirmed the workaround from @louisabraham works. I'm on the latest versions of everything, as far as I know, but I don't know how to check ZLE/etc ZSH: 5.7.1 |
@louisabraham @leehambley This issue is pretty old and is about paste failing entirely. If you're just seeing it behave slowly, you might be better off looking at this issue: #238 (comment) |
Issue seems to be Alacritty specific - alacritty/alacritty#2795 |
On the v0.1.x branch. Commit
6dd93ed
.OSX. El Capitan. Tried with both terminal and iTerm.
zsh version:
zsh 5.2 (x86_64-apple-darwin15.0.0)
has problemzsh version:
zsh 5.0.8 (x86_64-apple-darwin15.0)
does not have the problemWhen I paste anything to the terminal, nothing visibly happens. Terminal stops accepting an input until I ctrl-c at which point I get a new prompt.
Configuration available at https://github.com/SeanTAllen/dotfiles/blob/master/.zshrc
Problem doesn't happen when not using oh-my-zsh. I'm going to try to track the issue down. Haven't had any luck yet.
The text was updated successfully, but these errors were encountered: