dylanaraps / fff

📁 A simple file manager written in bash.
MIT License
4.07k stars 171 forks source link

Inappropriate ioctl for device (zsh) #192

Closed ghost closed 2 years ago

ghost commented 2 years ago

so i made a function within my .zshrc to be able to bind a key to fff. it looks like this:

fff-cd() { fff "$@" cd "$(cat "${XDG_CACHE_HOME:=${HOME}/.cache}/fff/.fff_d")" } zle -N fff-cd bindkey ^Z fff-cd

and it DOES open fff, however it ignores any input, stays in home directory and you dont even see directories, just the status bar. Heres the error from terminal:

stty: 'standard input': Inappropriate ioctl for device stty: 'standard input': Inappropriate ioctl for device

i dont know what this means or why this happens so any help is appreciated on how to fix this/make this work!

ghost commented 2 years ago

ok so i made it work not using bindkey ^Z fff-cd but bindkey -s "^z" "fff-cd\n", which instead of trying to run the function as a function, inputs the text "fff-cd" into the command line and practically presses enter so you run the command, which runs the function, which works.