I have a bash script that asks the user for single-key inputs to select from some menu screens. I'm using
read -n 1 -s -r -p '' and then doing stuff based on the user input passed through a small set of if statements.
I need to be able to prevent the user from accidentally dragging in a file acting as an input to the read command. I'm very open to replacing the
read command to then allow me to prevent this user action from disrupting the process, but I need this to be compatible with most shells.