diff --git a/spells/cantrips/ask_yn b/spells/cantrips/ask_yn index 488af7b..fb6ef29 100755 --- a/spells/cantrips/ask_yn +++ b/spells/cantrips/ask_yn @@ -16,9 +16,9 @@ trap "printf '\n'; exit 2" 2 # Use stty to make read command work for single character input old_stty_cfg=$(stty -g) stty raw -echo -printf "%s" "$prompt" +printf "%s" "$prompt" >&2 answer=$( while ! head -c 1 | grep -i '[yn]'; do true; done ) -stty "$old_stty_cfg" +stty "$old_stty_cfg" >&2 # If no answer is given, use the default answer if [ -z "$answer" ]; then