Am 23.06.26 um 11:29 schrieb Dag-Erling Smørgrav:
Benedict Reuschling <[email protected]> writes:
commit 15a1ba4a1c467a686573158fd5e49abafa42d587
Author:     Benedict Reuschling <[email protected]>
AuthorDate: 2026-06-23 13:13:44 +0000
Commit:     Benedict Reuschling <[email protected]>
CommitDate: 2026-06-23 13:13:44 +0000

     adduser.sh: Add info which separator to use in the question itself
We could just as easily normalize the separator:

-       [ -n "$_input" ] && ugroups="$_input"
+       [ -n "$_input" ] && ugroups="$(echo "$_input" | tr -s ',' ' ')"

DES

That's true and would be the "src" way of solving it, rather than the "doc" way of describing what to do. I've seen instances where people even did "wheel, operator" (extra whitespace after the ",").

I think when we actually tell people what to use as the separator, then we don't have to account for all kinds of varieties that users come up with to separate the groups (semicolons?). Ideally, the whole adduser.sh would be replaced by a sequence of bsddialogs (plus the parsing and checking), but that takes a bit more effort.

Cheers,
Benedict


Reply via email to