Skip to content
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

It breaks xsel expansion #13

Closed
lilydjwg opened this issue Aug 2, 2012 · 6 comments
Closed

It breaks xsel expansion #13

lilydjwg opened this issue Aug 2, 2012 · 6 comments

Comments

@lilydjwg
Copy link

lilydjwg commented Aug 2, 2012

When pressing Tab, command will expand. xsel wants to fstat on stdin, and this script breaks that.

See this superuser question for details.

@sunaku
Copy link
Member

sunaku commented Oct 9, 2012

The problem is that xsel(1) itself is emitting the error when this plugin is loaded, not that this plugin somehow breaks TAB completion on backticks:

$ xsel
fstat error on stdin: Bad file descriptor

@sunaku
Copy link
Member

sunaku commented Oct 9, 2012

Nope, I was wrong, but I found the actual problem this time: the _zsh_highlight_bind_widgets() function is rebinding all ZLE widgets to make them invoke _zsh_highlight(). During this process, it somehow breaks backticks expansion.

@sunaku
Copy link
Member

sunaku commented Oct 9, 2012

That function, which was copied directly from the zsh-syntax-highlighting plugin, has not changed since. So this bug should also exist in the zsh-syntax-highlighting plugin!

@sunaku
Copy link
Member

sunaku commented Oct 9, 2012

I was correct; the bug also exists in (and originates from) the zsh-syntax-highlighting plugin:

master ~/.zsh/bundle/zsh-syntax-highlighting> zsh -lf                                                          3:24PM
hostname% echo 'it works!' | xsel -pi      
hostname% echo it works\! 
it works!
hostname% source zsh-syntax-highlighting.zsh 
hostname% echo `xsel`xsel: fstat error on stdin: Bad file descriptor
echo

@sunaku
Copy link
Member

sunaku commented Oct 9, 2012

Adding @nicoulaj to comment.

@sunaku
Copy link
Member

sunaku commented Feb 17, 2015

I'm not able to reproduce this issue anymore (xsel runs fine now) in my current environment:

$ zsh --version
zsh 5.0.5 (x86_64-pc-linux-gnu)

$ xsel --version
xsel version 1.2.0 by Conrad Parker <conrad@vergenet.net>

$ cat /etc/issue
Ubuntu 14.10 
 \l

Please re-open this issue if you're still able to reproduce this problem. 👮

@sunaku sunaku closed this as completed Feb 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants