From nobody Wed Nov 18 16:41:57 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jV6nd6l6mz6w5y4 for ; Wed, 18 Nov 2026 16:41:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jV6nd2zPZz4V4K for ; Wed, 18 Nov 2026 16:41:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795020117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H8cvYfYMimC5wUmgxJtAZ2BXGBWGUgutsGLJM7oQcPY=; b=IP68Xk5VQssUQpTERNZo5I+WI67imaifTzi++NwUgVqnq8N/0E5sGfUDK5ssDzyb66InTU NXmOR2KRR6zixt/bJkSC3oKvInJALCGytF+374vc+vmbtDZ6/3ll2vSjUTbpGcurKBovja nLcnaMW5eJxoGoHTE494N7hYo1Kl+s1gr3usgEaJRUh9vFrHnzidieHkxUZfnUfrm3GSco C+YyYMjC7xStGlGvA8Eau/hzEyAxvWuQyl+VK6uUi3i0NNwhyVHzwJR6pxzEVOVhU5CMnP jdNW6Osh/JrQLIJacPKx/9lAnz+15/EsEPgTkTFNN/dQcBMtyDhLM30zWDd55g== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795020117; b=HrXGXJp/yfW4uZG3Tx9xn+XGS4u7ShPi2jevUBKkLVDwKXV9EqJ0xBdAMTs2sO/icpwTtG xfpPCeHiWRn4lvVyi+DTQ+jIgiyrCm1wpNEE5RVa9ob74uC9PMXM2JXz/kmO19nOY43YPK 0I8JRiT1NMD/pOoqXDrRVu+mo6G28/IgDfE3HgYDcxgVFWpdfiLfgV6M4usRKQOSUuKRbm sVmPgoZ5IO4b88JkKkvRgtadcTv7XOYMv/LhYFXGm9cQKd0SCniCrks4OFdSYqazSoaF2B xUpXqp2JaqRmJsM9/LPyo4A+VilkIU0zthNQcnTHjkbNtmaNFinlb9ozwMA3Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795020117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H8cvYfYMimC5wUmgxJtAZ2BXGBWGUgutsGLJM7oQcPY=; b=kMMVstBEe/u0B+tdLnE53BV5QHRCEFnk4YeO1e6GPHC9294z1Sd1SDXBE4r6G93W2P4lu+ VEEf8gIiM6dptMynn1gcfsUeE3dFDqEG4CwAphxIuzn+Ih+EQ9fju/rqqiLdYB89gajMRI Gl8W6fj+kcAI3xK3Q+GxTZHhp3MsnD0RQ5BFX6Z3F7YmIWC+Yk9AHZjX9tRO6p9If1GL2U PMVjJcIWt5buWyihlNnjTW/gzd+m5Y/bVsvCp9j0L1dHYxsZBgBG1OeWOe1uQu3Q4Df8fJ RYUMG8qOv9tQS6StCl4QEi3HZ+eZV3e/A+0BgTl07pJBGuYiRmy0gqbDvD4c7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jV6nd2bMRzLbc for ; Wed, 18 Nov 2026 16:41:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 5e76 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 18 Nov 2026 16:41:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Devin Teske Subject: git: 929b2561250b - main - sysrc: Add -_*~$ as non-delimiter list operation chars List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dteske X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 929b2561250b2f304d04e09ffaab30b1be90a578 Auto-Submitted: auto-generated Date: Wed, 18 Nov 2026 16:41:57 +0000 Message-Id: <6afdd555.5e76.51cb8849@gitrepo.freebsd.org> The branch main has been updated by dteske: URL: https://cgit.FreeBSD.org/src/commit/?id=929b2561250b2f304d04e09ffaab30b1be90a578 commit 929b2561250b2f304d04e09ffaab30b1be90a578 Author: Devin Teske AuthorDate: 2026-11-18 16:37:45 +0000 Commit: Devin Teske CommitDate: 2026-11-18 16:37:45 +0000 sysrc: Add -_*~$ as non-delimiter list operation chars This is potentially a breaking change (MFC not recommended). List operators += and -= should not consider some characters as delimiters when they appear as the first character. The += and -= operators allow specifying the list delimter as the first character. For example, `sysrc foo+=,123` will iterate over the value of foo delimited by commas, and if 123 is not found will append `,123` to the value of foo. However, for the sake of convenience, sysrc has always supported defaulting to using $IFS as delimiter when the first character of the += or -= list operator is [a-zA-Z0-9./]. For example, if you execute `sysrc foo+=abc` or `sysrc bar+=/tmp` or `sysrc baz-=.text` then the lists foo, bar, and baz are all presumed to be delimited by $IFS. By adding [-_*~$] we potentially break lists delimited by any of those individual characters, but we gain the ability to simplify list operations. This opens up the ability to execute commands such as: sysrc ldconfig_paths+='${_localbase}/lib64' sysrc pppoed_provider+="*" sysrc rtsol_flags+=-i sysrc foo+=_local32 sysrc dirs+=~user Meanwhile, the comma-leading syntax is preserved as-well as colon- and semicolon-leading syntaxes. Reviewed by: kfv Differential Revision: https://reviews.freebsd.org/D61658 --- usr.sbin/sysrc/sysrc | 6 +++--- usr.sbin/sysrc/sysrc.8 | 12 +++++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/usr.sbin/sysrc/sysrc b/usr.sbin/sysrc/sysrc index 5eae2096f8ef..54939cad0b96 100644 --- a/usr.sbin/sysrc/sysrc +++ b/usr.sbin/sysrc/sysrc @@ -16,7 +16,7 @@ pgm="${0##*/}" # Program basename # # Version information # -SYSRC_VERSION="8.1 Nov-16,2026" +SYSRC_VERSION="8.2 Nov-16,2026" # # Options @@ -735,7 +735,7 @@ while [ $# -gt 0 ]; do delim="${add%"${add#?}"}" # first character oldIFS="$IFS" case "$delim" in - ""|[$IFS]|[a-zA-Z0-9./]) delim=" " ;; + ""|[$IFS]|[-a-zA-Z0-9./_*~$]) delim=" " ;; *) IFS="$delim" esac new="$before" @@ -759,7 +759,7 @@ while [ $# -gt 0 ]; do delim="${remove%"${remove#?}"}" # first character oldIFS="$IFS" case "$delim" in - ""|[$IFS]|[a-zA-Z0-9./]) delim=" " ;; + ""|[$IFS]|[-a-zA-Z0-9./_*~$]) delim=" " ;; *) IFS="$delim" esac new= diff --git a/usr.sbin/sysrc/sysrc.8 b/usr.sbin/sysrc/sysrc.8 index 2cadeb8f03ca..e0330bfd3769 100644 --- a/usr.sbin/sysrc/sysrc.8 +++ b/usr.sbin/sysrc/sysrc.8 @@ -281,8 +281,18 @@ For convenience, if the first character is alpha-numeric .Pq letters A-Z, a-z, or numbers 0-9 , dot .Pq Li \&. , -or slash +slash .Pq Li / , +dash +.Pq Li - , +underscore +.Pq Li _ , +asterisk +.Pq Li * , +tilde +.Pq Li ~ , +or dollar +.Pq Li $ , .Nm uses the default setting of whitespace as separator. For example, the above and below statements are equivalent since