Execute function in bash on every keystroke in interactive shell
0
votes
1
answer
512
views
I would like to run a function every time a user presses a key in an interactive bash shell.
I am wondering if bash has anything built in like the self-insert function in zsh?
Alternatively, I am wondering if there is some file descriptor I could read from that contains the buffer, similar to the $BUFFER variable in zsh?
Note: I am aware of this question: https://superuser.com/questions/604812/how-to-execute-a-function-in-bash-or-zsh-on-every-letter-being-typed-into-prompt .
I am looking to build something similar to the
script
command but without using pseudo-terminals
Asked by falky
(189 rep)
Dec 17, 2020, 02:22 AM
Last activity: Dec 17, 2020, 06:40 AM
Last activity: Dec 17, 2020, 06:40 AM