stty: 'standard input': Inappropriate ioctl for device

When i added

stty intr ^X

to my ~/.zshrc file it is always showing stty: 'standard input': Inappropriate ioctl for device on startup.

Please help, thanks in advance.

1 Answer

Use of stty should really only be used with interactive shells. The simplest option is to prefix the stty statement with a conditional so that it is only executed in an interactive shell.

Here is one way to do it:

[ "$PS1" ] && stty intr '^C'

Hope this helps 👍🏻

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like