git: c8d87fd983e9 - stable/15 - rmuser.sh: Improve prompt consistency with adduser

From: Alexander Ziaee <ziaee_at_FreeBSD.org>
Date: Fri, 19 Sep 2025 00:46:15 UTC
The branch stable/15 has been updated by ziaee:

URL: https://cgit.FreeBSD.org/src/commit/?id=c8d87fd983e96785a58967fca40db6d2f2a3a850

commit c8d87fd983e96785a58967fca40db6d2f2a3a850
Author:     Alexander Ziaee <ziaee@FreeBSD.org>
AuthorDate: 2025-09-09 17:06:29 +0000
Commit:     Alexander Ziaee <ziaee@FreeBSD.org>
CommitDate: 2025-09-19 00:45:25 +0000

    rmuser.sh: Improve prompt consistency with adduser
    
    While here, improve userlist error message.
    
    PR:                     289399
    MFC after:              3 days
    Reviewed by:            kbowling, rgrimes
    Approved by:            kbowling, rgrimes (src)
    Reported by:            michaeldexter, rgrimes
    Differential Revision:  https://reviews.freebsd.org/D52464
    
    (cherry picked from commit fc68f8aac623b5494484adfa41ac600415609870)
---
 usr.sbin/adduser/rmuser.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/usr.sbin/adduser/rmuser.sh b/usr.sbin/adduser/rmuser.sh
index 4c1e4049763a..8e5dd28cf01f 100644
--- a/usr.sbin/adduser/rmuser.sh
+++ b/usr.sbin/adduser/rmuser.sh
@@ -303,7 +303,7 @@ if [ ! "$userlist" ]; then
 		show_usage
 		exit 1
 	else
-		echo -n "Please enter one or more usernames: "
+		echo -n "Please enter one or more usernames, or press enter to exit: "
 		read userlist
 	fi
 fi
@@ -333,11 +333,11 @@ for _user in $userlist ; do
 		echo
 		echo $userrec
 		echo
-		if ! prompt_yesno "Is this the entry you wish to remove? " ; then
+		if ! prompt_yesno "Is this the entry you wish to remove? (yes/no): " ; then
 			continue
 		fi
 		_homedir=`echo $userrec | awk -F: '{print $9}'`
-		if prompt_yesno "Remove user's home directory ($_homedir)? "; then
+		if prompt_yesno "Remove user's home directory? [$_homedir] (yes/no): "; then
 			pw_rswitch="-r"
 		fi
 	else