From 40bffcdd5fbe6d0938cd54c42f8931ee911478cd Mon Sep 17 00:00:00 2001 From: bryan Date: Thu, 24 Apr 2025 22:41:37 -0400 Subject: [PATCH] Accept one-letter y/n --- installJRMC | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/installJRMC b/installJRMC index ec9c816..59bb004 100755 --- a/installJRMC +++ b/installJRMC @@ -1617,6 +1617,7 @@ uninstall() { mv "$SCRIPT_DIR/.uninstall" "$SCRIPT_DIR/.uninstall.bk" fi + echo "To remove installJRMC output: rm -rf $OUTPUT_DIR" echo "To remove your MC library: rm -rf $HOME/.jriver" return 0 } @@ -1798,8 +1799,8 @@ err() { echo "Error: $*" >&2; } ask_ok() { local response ((YES_SWITCH)) && return 0 - read -r -p "$* [y/N]: " response - [[ ${response,,} =~ ^(yes|y)$ ]] + read -n 1 -r -p "$* [y/N]: " response + [[ ${response,,} =~ ^y$ ]] } execute() { if debug "$*"; then