From nobody Wed Jan 31 15:23:36 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 4TQ5Qw6KZQz58kHJ; Wed, 31 Jan 2024 15:23:36 +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 4TQ5Qw5lWMz45Bt; Wed, 31 Jan 2024 15:23:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706714616; 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=L6gzxbu3C7lFUl30ouk152vzCV+aAE84o5YGl1iZqNg=; b=pnG45WUFS6Qtlz7IqenvTWYx8RxrR57VWChMCdyAhHJHidxl0Vtg3+G/v9MSoKY2i01xjP /G+Oh6bCLz/VBANAZkk6MjoudsdduVwrGQC6Wr11vVHbJ2KcKYB7c9XcEoXhT0MXEdHXWK R7diasicXsw7rXyl5cPiy+agUm4dVWt20mSrYMEfHzuFlvf42rJVYX7jQ/fJLat+rMqQd/ +QJQ5db7uy9qjJUQAcyRA4bDT6tH8N+XSxlwVJ2o1yU4aBo5rE+YL3cjXaL5T8v0m+2amK +9wFkYO/Czb01es/sU/Rmz+utbebnKPbAbHCcfUPUOO8Xlannb1CLTYy3Rps0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706714616; 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=L6gzxbu3C7lFUl30ouk152vzCV+aAE84o5YGl1iZqNg=; b=SGU6G89sR2GCLs26tI/kL1xpJaZJYOu+fcfoFNJ5nbKXbofM6WDuasEmtGwvJDtBX/WzxV TxCLPVrTmHQfcBzfxFIznl1ctqSztoo5n7+lP4nLNQE5LqWHaXFixq3sfK+Dfk5U1WaDst 1NqIeWAUdZ9pzk0XX9pAQRzliV/qDFA/OTDcm0749u5X+/zh5aOueZ//gYNJqsBUCisuTu 01Is+wMpbOzIOu5ab+hUjhFEytxPwG2/AGDPjndhskJMKUVUhSRRkADjIS328lC+zqlq+r zwXb1rtDH7/NURNkP9dSs5JqoBY2imkckAWiAqy2ehd3DTMq0WKDFND0BFkTrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706714616; a=rsa-sha256; cv=none; b=hk7ljuSMJs/vBAaTYOW/XcMgyHt0tRYYiU3vaYT/6GzF8/GLcKY46ICIrPzNTF5+yY3VDz 8GcN/H5rUhRxuomjiilRIqFjI6VUIWTQgh8bZgaL2D3MooXik3sAo0bN1liyysHSJAvk23 UCIcCT4yw13bmDblH4jgrZ/BMUrFp8zg8Xfwoc4qPdxELjnlB36TkEsYn061wDEplQtPiR 0CFtnBs1DdMrYWQeV3pm8kaPiRFcqQtH3U7eOs2YahFOhEj5xO6xsv4UF88dvB99NeY2jK 60vLRL/vgKZadR4Gs/98uLR0c2T4DfJ/EJYlJuGwbTvZSuXKP64j9ukiQQTn1A== 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 4TQ5Qw4pWMzP8D; Wed, 31 Jan 2024 15:23:36 +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 40VFNaMk042369; Wed, 31 Jan 2024 15:23:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40VFNahI042366; Wed, 31 Jan 2024 15:23:36 GMT (envelope-from git) Date: Wed, 31 Jan 2024 15:23:36 GMT Message-Id: <202401311523.40VFNahI042366@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: 47cb760dac09 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 47cb760dac09ee10343e58cd46e923f27bd87f9b Auto-Submitted: auto-generated The branch stable/14 has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=47cb760dac09ee10343e58cd46e923f27bd87f9b commit 47cb760dac09ee10343e58cd46e923f27bd87f9b Author: Wolfram Schneider AuthorDate: 2024-01-25 07:14:06 +0000 Commit: Wolfram Schneider CommitDate: 2024-01-31 14:47:33 +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 777726f880db..cd047862727d 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 }