From nobody Mon Feb 12 15:49:39 2024 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 4TYTRS0MGyz5B2kH; Mon, 12 Feb 2024 15:49:40 +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 4TYTRR4XY6z43bb; Mon, 12 Feb 2024 15:49:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707752979; 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=uEf4GKz7oV44ZySg0xJNFIZmJf9ohB4iJr5xyQdE3fo=; b=qiuFN8rDAN+dD2o487Al9ryNkpHcmMiDmLopaDZk4qLgRp+elIIhjDlfleR3ABBI+5CSbM x0fjdOH2psTLqD56Q76Ms55GMT6g4w9LPmc+q8Y+3Wrla0FANYt5RFOtTQhggmpKvdSYSi GfU3nDi36p8YvIDW/d0LHnke4IrRX/+DQshrsshe26kLT0Wk3uVAL8cLH/BC2FADNsr5Ss djFtrxefnfA5iJPzx5rbpXI3x3w8AsEKp0ER31Xid8+hi9lH3DDkECacZKJSy8NPyoYzSN 3K6mATXmGYpKYCQcGMLPC77RQ5/0kgJcsJv002vVAtbe1fsJBTIOPLG6rCLZQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707752979; a=rsa-sha256; cv=none; b=rP7jKdSVsD47cDT4nGumdlj2iihXoVnP7ThTCgiA+8XALUTwuDxWcNeoRAhvLB26JBSwvw aH0IINIBvuypAGbeYOIRKD5BdxdMrg1Zl8nnBybIw1QlofMIYoHJzKV2WOLpZ6whu35qvR VnPWJDt9u5sM8c/1TUYOjdjH7DIoulZGxj+mEY247xG+sSmbDJ1lVRFqKGbLgh4eAjYGUp DFDksa1Lj1hnB85fZAWFC/aLFkkTNR3pFzn0fF+bH8B/dRPIWxQduorNxUbO38T+92UaoC rcL1803MuWm91Ly0T9D1WjzAubg99oCZlfbZv6KjJayzf9JNmvhT4cDPLvgU0Q== 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=1707752979; 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=uEf4GKz7oV44ZySg0xJNFIZmJf9ohB4iJr5xyQdE3fo=; b=hptW3LBV85V+9RCrzeAbuaCqpKrK57pddz0P3xtb/A23vxpplDJxbRj50qdoB4gSf5GJJd +NOUp17wuQGVC4oNrVjIZ2s3wghL9aeNIBsrx7Kk8B0qRWDUtAPipeAVEwlVh4IsmR+0YI y9KHvWVrITN666iQX4B3V8b8LplQR2bAa4VUmVTZqoJVq1awk5zrlhqCrfhxOl5KLuyXiE QUpSXl3Fh4snTZa56w30AyI1iwgvNQkBL5KtWl7iHfc0zCMC9CNAmiT1DsXmxT2afj9YXo 36urhrgNbsqbUdcqrGuyarXs0LY+GyYOt29gc4wVE46bRshWM1kEtEUjsZoLSw== 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 4TYTRR3fLczYBj; Mon, 12 Feb 2024 15:49:39 +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 41CFnd14010230; Mon, 12 Feb 2024 15:49:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41CFndL8010227; Mon, 12 Feb 2024 15:49:39 GMT (envelope-from git) Date: Mon, 12 Feb 2024 15:49:39 GMT Message-Id: <202402121549.41CFndL8010227@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wolfram Schneider Subject: git: fedb7575a920 - stable/13 - man: support special characters in filenames 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: wosch X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fedb7575a9202fae644c8499cfa9579d5765e3df Auto-Submitted: auto-generated The branch stable/13 has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=fedb7575a9202fae644c8499cfa9579d5765e3df commit fedb7575a9202fae644c8499cfa9579d5765e3df Author: Wolfram Schneider AuthorDate: 2024-01-25 07:14:06 +0000 Commit: Wolfram Schneider CommitDate: 2024-02-12 15:48:48 +0000 man: support special characters in filenames man.sh needs to handle double quotes and sub shell character as '`' '$' etc. PR: 275967 Reviewed by: bapt MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43453 (cherry picked from commit b8a484ec343d163a40f7cf4a6026e880f992c738) --- usr.bin/man/man.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index 8cce52148699..ca9b002dfc08 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -349,7 +349,7 @@ man_display_page() { decho "Command: $cattool \"$catpage\" | $MANPAGER" ret=0 else - eval "$cattool \"$catpage\" | $MANPAGER" + $cattool "$catpage" | $MANPAGER ret=$? fi fi @@ -374,7 +374,7 @@ man_display_page() { pipeline="mandoc $mandoc_args | $MANPAGER" fi - if ! eval "$cattool \"$manpage\" | $testline" ;then + if ! $cattool "$manpage" | eval "$testline"; then if which -s groff; then man_display_page_groff else @@ -387,10 +387,10 @@ man_display_page() { fi if [ $debug -gt 0 ]; then - decho "Command: $cattool \"$manpage\" | $pipeline" + decho "Command: $cattool \"$manpage\" | eval \"$pipeline\"" ret=0 else - eval "$cattool \"$manpage\" | $pipeline" + $cattool "$manpage" | eval "$pipeline" ret=$? fi } @@ -480,10 +480,10 @@ man_display_page_groff() { fi if [ $debug -gt 0 ]; then - decho "Command: $cattool \"$manpage\" | $pipeline" + decho "Command: $cattool \"$manpage\" | eval \"$pipeline\"" ret=0 else - eval "$cattool \"$manpage\" | $pipeline" + $cattool "$manpage" | eval "$pipeline" ret=$? fi }