From nobody Wed Aug 02 20:48:00 2023 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 4RGPFQ1c9MzZmRV; Wed, 2 Aug 2023 20:48:05 +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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGPFK2j7Qz3HnB; Wed, 2 Aug 2023 20:48:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691009285; 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=sqPtXOAgdfF/CmOzNhEpBjswqW33dL0SAk0Xef2SvoA=; b=dlDoQX+fzuSI2sc2XMi6pIRSKNyTLJtqAdVGrzmGd+BUiji1WYK54dcxVYrbTEx762s+3d fMYS71dIx8NEd1dJnL1iP9Kot8twC9hGGEFNMubC0aUA35oORx7EeoNpg9G6g/R5DTYD4m MmCVgu8K9vciMccvl+CK0NCfzKBVhjEw9uIDNC3vt1iewPrYNpfEXgI3sWLdNo1CnqdDRI /RVpHF7jqpq/j5WpuEErIFPX1HmziGQhIdBB9ClNAnhLBQ9sGrHL3eBfWpgE5f+mDvbceP HQPb1+t+zfg9stFhrJFo0sNVEDzbJ7AftetsFN9YzudfK0KSBuzhTWZZD42Saw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691009285; a=rsa-sha256; cv=none; b=NhwrSh3Xv5XeC43tVCDRHTPLWaX/kgkWa6wPrarJmpFYhx6HGJLkol31Pj2M9q2oSy0T97 Q0R8HX0ptPQR4dCO7IxTAMxf5/4eHGdYPn6nnJN2s52q+4tagCC6avpqdhx9pGrU3RFHPX Uq7509Wt1eiUvklF60FMfyF40pbl83FmkxLODNlZMmms/LoY5dlFQ8SSsbthqoN89O4X/9 D4U9J7Ocr2msNpsYfVbP0uygJ6pT49BUCrfBccCvCJMdhOxVBd0RKFCONsOod17bTRQGoW Q2c2NXdL9xgF9rW8AdjhVkWgq3N+GHETXGW6+Vj/5tRgGIRZ+6FMETHrmwlfdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691009285; 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=sqPtXOAgdfF/CmOzNhEpBjswqW33dL0SAk0Xef2SvoA=; b=sZZuXE57CrFnhnB2UX26S2IDllGidyz3qyr/GMA6ODiCnwjt5AdRjqmwj9lIMKnbTRtYTi HSlY6bP4rxR++pTGGSZhuykdEQChgzcN3M6CjuwwBMhT4NoT52lw/IdQLqtObkFPjWKejq pPTeUe6CClwnXq4SiOJK76ID437U5nkWK4zzm7i2lcYyhwXZSnM0day03BeAAaRH49sLKQ qZc/1Y5sDoLPKpfstMa38N1/+PZ2oCUPfOdbJrTL+eVugVeKXNqTnG4uJ6GtXYESeOCnI1 bUAAxRd10681RCQVKRQM04ZPzEVzL2GlR5Zhh8mQM6VhrUtR5k1UYhnKp3uM1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RGPFJ3GP9zYLP; Wed, 2 Aug 2023 20:48:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 372Km0EM067045; Wed, 2 Aug 2023 20:48:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 372Km0sp067044; Wed, 2 Aug 2023 20:48:00 GMT (envelope-from git) Date: Wed, 2 Aug 2023 20:48:00 GMT Message-Id: <202308022048.372Km0sp067044@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 8a5c836b51ce - main - man: fix `man -K` search List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8a5c836b51ce29fb22e0692c03fbc1e405c6522f Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=8a5c836b51ce29fb22e0692c03fbc1e405c6522f commit 8a5c836b51ce29fb22e0692c03fbc1e405c6522f Author: Ed Maste AuthorDate: 2023-08-01 18:00:48 +0000 Commit: Ed Maste CommitDate: 2023-08-02 20:46:57 +0000 man: fix `man -K` search Quote re arg to grep in case it has spaces, and quote [:blank:] tr arg to avoid the shell interpreting []. PR: 272729 Reviewed by: Mina Galić Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41282 --- usr.bin/man/man.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index 4fd6f886e87f..c95b47e2ee62 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -1000,11 +1000,11 @@ do_full_search() { gflags="${gflags} --label" set +f - for mpath in $(echo "${MANPATH}" | tr : [:blank:]); do - for section in $(echo "${MANSECT}" | tr : [:blank:]); do + for mpath in $(echo "${MANPATH}" | tr : '[:blank:]'); do + for section in $(echo "${MANSECT}" | tr : '[:blank:]'); do for manfile in ${mpath}/man${section}/*.${section}*; do mandoc "${manfile}" 2>/dev/null | - grep -E ${gflags} "${manfile}" -e ${re} + grep -E ${gflags} "${manfile}" -e "${re}" done done done