alacritty: Hangs when pasting from clipboard

System

Operating System Linux
Display Server X11
Window Manager i3
Compositor compton

Summary

When attempting to paste from the clipboard, Alacritty hangs for a few seconds (multiplied by the number of times <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>v</kbd> is pressed). I searched and found a few other clipboard issues but they all seem to affect Wayland rather than X11.

This has only been an issue since updating Alacritty from 0.3.2 to 0.3.3.

Behavior

If I use Nextshot to take a screenshot then paste the URL into Alacritty, it hangs before oh-my-zsh finally spits out a bracketed-paste-magic:zle:47: not enough arguments for -U error and nothing is pasted. If I paste the URL into Firefox, then copy from the address bar back into Alacritty, it works as expected.

Expectation

Link should be pasted into the terminal without hanging

Extra

While OMZ spits out an error, plain zsh (with zsh -f) and bash hang with no error.

If I run Alacritty with -vv, when it hangs I get:

Unable to load text from clipboard: Selection timed out

This seems to only affect clipboard contents that has a mime type (or specific target?) set: image

As an aside, pasting images from Firefox still displays the bracketed-paste-magic error from OMZ, but does not hang. If an image is pasted after being copied with -t image/png, it hangs and errors the same as text.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

I have the same issue:

bracketed-paste-magic:zle:47: not enough arguments for -U

Bump, getting this too. Started happening after upgrade from 0.3.2 to 0.3.3

Termite works as expected, as does Alacritty if I downgrade back to 0.3.2. It got a bit confusing with multiple terms, versions, flags and content types so I’ve put it all in tables.

If it helps visualise, I also took a short screen cap earlier this morning to see if someone else had the same issue (they did): https://nc.dsdev.io/s/aacwJetTckXG9TP

Alacritty 0.3.3

xclip flags Content Behaviour
None Text Works
-t text/plain Text Hangs then bracketed-paste-magic error*
None Image No hang, but still gets bracket-paste-magic error*
-t image/png Image Hangs then bracketed-paste-magic error*

* bracketed-paste-magic:zle:47: not enough arguments for -U happens only in Oh My ZSH. Bash (and ZSH with -f) do not display the error, but otherwise behaviour there is the same.

Alacritty 0.3.2

xclip flags Content Behaviour
None Text Works
-t text/plain Text Works
None Image No hang - Error: target STRING not available in shell
-t image/png Image No hang - Red Alacritty Error (screenshot below)

Termite

xclip flags Content Behaviour
None Text Works
-t text/plain Text Works
None Image No hang - fails silently
-t image/png Image No hang - fails silently

Alacritty error in 0.3.2 (somewhat expected given it’s an image): image

@nixpulvis I’m running the same version of xclip as you (also on Arch).

xclip -o -selection clipboard -t text/plain works fine; the issue lies in pasting with ctrl-shift-v after doing echo foo | xclip -selection clipboard -t text/plain.

Middle-click works to paste, but that seems to be pulling from the primary selection rather than clipboard which is what you’d get with the keybinding.

This is in Wayland. I can give you the config files if that helps you… Which ones would you need?

Hi, I’m still getting this issue.

I’m on alacritty 0.3.3 (14fa026), zsh 5.7.1 (x86_64-debian-linux-gnu) and using OhMyZSH.

When trying to paste, I get:

bracketed-paste-magic:zle:47: not enough arguments for -U

This didn’t happen before a recent update…