Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Many days ago, the zsh of my Arch Linux did what I want: if I entered `xsel` and pressed Tab, it would be replaced by the output of xsel. Now, on the same box, I get this:

xsel: fstat error on stdin: Bad file descriptor

What's more strange, I have setup another Arch Linux now, with the same zsh and config files. It just does this expansion right.

I write a simple script a to discover what happens to the stdin:

#!/bin/zsh
echo $(readlink /proc/self/fd/0)

Let's try again---`./a`, and press Tab. On the former box, I get

pipe:\[4434444\]

and on the latter which is what I want:

/dev/pts/6

What should I do further to find out why they are different and get the expansion right?

share|improve this question

1 Answer 1

I finally find out that this is caused by this zsh-history-substring-search script sosurced from my .zshrc when available. I still don't know why this happens, but I've opened an issue for this.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.