git: fc68f8aac623 - main - rmuser.sh: Improve prompt consistency with adduser

From: Alexander Ziaee <ziaee_at_FreeBSD.org>
Date: Thu, 11 Sep 2025 01:06:27 UTC
The branch main has been updated by ziaee:

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

commit fc68f8aac623b5494484adfa41ac600415609870
Author:     Alexander Ziaee <ziaee@FreeBSD.org>
AuthorDate: 2025-09-09 17:06:29 +0000
Commit:     Alexander Ziaee <ziaee@FreeBSD.org>
CommitDate: 2025-09-11 00:43:37 +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
---
 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