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

Zsh giving Inappropriate ioctl for device #135

Open
krillxox opened this issue May 4, 2020 · 6 comments
Open

Zsh giving Inappropriate ioctl for device #135

krillxox opened this issue May 4, 2020 · 6 comments
Labels

Comments

@krillxox
Copy link

krillxox commented May 4, 2020

In to order to launch pet-select by c-r, I pasted this code in my .zshrc file:

function pet-select() {
  BUFFER=$(pet search --query "$LBUFFER")
  CURSOR=$#BUFFER
  zle redisplay
}
zle -N pet-select
stty -ixon
bindkey '^r' pet-select

When I launch konsole it gives me stty: 'standard input': Inappropriate ioctl for device
Am I missing something?

@yutkat
Copy link

yutkat commented May 5, 2020

Same here.

It happened when I had async load.
It hasn't happened since I wrote it directly in .zshrc.

@leandro-deveikis
Copy link

Any update about this? I am still getting the same error. I tried several solutions I find, but no luck

@RamiAwar
Copy link
Collaborator

RamiAwar commented Feb 19, 2024

Did you try putting it in the beginning of the file? @leandro-deveikis @krillxox @yutkat

@RamiAwar RamiAwar added the bug label Feb 19, 2024
@RamiAwar
Copy link
Collaborator

I still get this error if my snippet is not at the top of .zshrc:

stty: stdin isn't a terminal

@RamiAwar
Copy link
Collaborator

Don't ask me why, but I think this fixes it:
Replace stty -ixon with

stty -ixon <$TTY >$TTY

@RamiAwar
Copy link
Collaborator

Could you do me a favor and let me know if it fixes it for you too? @leandro-deveikis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In Progress
Development

No branches or pull requests

4 participants