From nobody Fri Jan 05 08:21:35 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 4T5xHz2PWyz56VB6; Fri, 5 Jan 2024 08:21:35 +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 4T5xHz1jBhz45Y6; Fri, 5 Jan 2024 08:21:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704442895; 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=t3EwlNyRUKeSg6e66gXqfr7NwsePlIfVVODwsK1LOU8=; b=HU3PkcSDQwUiGNOKBGcn/Z+BKtqsjh7qYsTyIlaSu6YOXdUmcQ4qUXHPAmTP5geDd2M1Hf ZoSQqX3CWIYj80iJ+LcgIYW0rDD/yJVDdyJ8I0FDlB/y1vQjkGIduSA427gEJrDm4ZrRHj ScA9JHrkIQz4Y114Dqt0rgUn6aMFKbudsMIh/1gG6khL9rDk01TScFtn9ppZr82gtmZoqe El+KS8jcg6Hv0b0Ho4DTPAcYcqb4H5YhoEkquEa6k/p4f2NicAvTLZi8y44r9084DduqSP bkPFifrMknk5YySuUL0d5+XHu9NDRpJa6nk/ES3O980kk/d8xV/iHLIGZUu/aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704442895; 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=t3EwlNyRUKeSg6e66gXqfr7NwsePlIfVVODwsK1LOU8=; b=ihK0Aqkqrgp0SlBC/+4WaIGPqqoDpgLf1pGTQHpRC46NbQ6yzGn/EGasaA8FSOWd1AmBus PDGhWJ5PqW7QA+xWWfkz0YtxLNW3Wv929AOJH1pUaZc9iH1mPFkGiiJ8bbeeMkhDmGSdOX Mbal8dzQ9hbAJLNK5kMbdpmRqP08W43zeEciHddooRNDssBNce4MRLcIoVPUhwV4igf5ng 00qqczhEm6HfqTyGzTs9wg+mj9kg+96dxHBE2Yv9UHovXQryvDLKxU3Qn5nExhuUEaDEdF 6FU6+WIvrHE1CRKVyTXKQJJNu/O2wem63ccXfm9ZYtXDV6lv6Dh3PwoKb8siIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704442895; a=rsa-sha256; cv=none; b=I5SsVheHf2797bbSLHGxOxeRlrVPZWBOdBegzPKH6F1Oi+WrIYYoPdqaFnHrFs4dIEjgbx R1d8c8bnwe0xPPdQOpNFV1Fv3CHOSpkVSJ3ZUazl8xqT52lU/6M6T41YTRD4wXk3KkoeKt ywoIGuWJYu1E9tTLd/Ww1aPjqdjAd/ZkXm/ZRjf2HHXPcIfQUc/Vy77biSSHwnSL2hFM2N 47Up6qnNpVUKldQVtMSzkpYVxzSqAu0pTZTgDD5+H18KbK+nv0s9CT2WTDFaq4oSRn6tdT 6P5PB4lT2L1YSnTqhkaAXsvhjoyfUUnmUdUhnI/+CwxiNck8Ra3W25JGj+Cgww== 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 4T5xHz0m4Hzqdl; Fri, 5 Jan 2024 08:21:35 +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 4058LZxB031674; Fri, 5 Jan 2024 08:21:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4058LZqd031671; Fri, 5 Jan 2024 08:21:35 GMT (envelope-from git) Date: Fri, 5 Jan 2024 08:21:35 GMT Message-Id: <202401050821.4058LZqd031671@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: 5e78db7b45ed - stable/13 - support spaces 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: 5e78db7b45ede9b8799fa0d293d282842aa00cc0 Auto-Submitted: auto-generated The branch stable/13 has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=5e78db7b45ede9b8799fa0d293d282842aa00cc0 commit 5e78db7b45ede9b8799fa0d293d282842aa00cc0 Author: Wolfram Schneider AuthorDate: 2023-12-28 10:50:29 +0000 Commit: Wolfram Schneider CommitDate: 2024-01-05 08:21:29 +0000 support spaces in filenames PR: 275978 MFC after: 1 week (cherry picked from commit 789480702e490818244af11279868ba4f3dabe6b) --- usr.bin/man/man.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index ed5724d64678..114ea9d7a0b2 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -133,14 +133,14 @@ check_man() { if exists "$1"; then # We have a match, check for a cat page manpage=$found - setup_cattool $manpage - decho " Found manpage $manpage" + setup_cattool "$manpage" + decho " Found manpage \"$manpage\"" if [ -n "${use_width}" ]; then # non-standard width unset use_cat decho " Skipping catpage: non-standard page width" - elif exists "$2" && is_newer $found $manpage; then + elif exists "$2" && is_newer $found "$manpage"; then # cat page found and is newer, use that use_cat=yes catpage=$found @@ -283,7 +283,7 @@ man_check_for_so() { # We need to loop to accommodate multiple .so directives. while true do - line=$($cattool $manpage | head -1) + line=$($cattool "$manpage" | head -1) case "$line" in .so*) trim "${line#.so}" decho "$manpage includes $tstr" @@ -313,7 +313,7 @@ man_display_page() { # just zcat the catpage and we are done. if [ -z "$tflag" -a -n "$use_cat" ]; then if [ -n "$wflag" ]; then - echo "$catpage (source: $manpage)" + echo "$catpage (source: \"$manpage\")" ret=0 else if [ $debug -gt 0 ]; then @@ -471,8 +471,8 @@ man_find_and_display() { decho "Found a usable page, displaying that" unset use_cat manpage="$1" - setup_cattool $manpage - if man_check_for_so $manpage $(dirname $manpage); then + setup_cattool "$manpage" + if man_check_for_so "$manpage" "$(dirname \"$manpage"")"; then found_page=yes man_display_page fi @@ -491,7 +491,7 @@ man_find_and_display() { # Check if there is a MACHINE specific manpath. if find_file $p $sect $MACHINE "$1"; then - if man_check_for_so $manpage $p; then + if man_check_for_so "$manpage" $p; then found_page=yes man_display_page if [ -n "$aflag" ]; then @@ -505,7 +505,7 @@ man_find_and_display() { # Check if there is a MACHINE_ARCH # specific manpath. if find_file $p $sect $MACHINE_ARCH "$1"; then - if man_check_for_so $manpage $p; then + if man_check_for_so "$manpage" $p; then found_page=yes man_display_page if [ -n "$aflag" ]; then @@ -518,7 +518,7 @@ man_find_and_display() { # Check plain old manpath. if find_file $p $sect '' "$1"; then - if man_check_for_so $manpage $p; then + if man_check_for_so "$manpage" $p; then found_page=yes man_display_page if [ -n "$aflag" ]; then @@ -535,7 +535,7 @@ man_find_and_display() { # Nothing? Well, we are done then. if [ -z "$found_page" ]; then - echo "No manual entry for $1" >&2 + echo "No manual entry for \"$1\"" >&2 ret=1 return fi @@ -973,8 +973,8 @@ do_man() { fi man_setup - for page in $pages; do - decho "Searching for $page" + for page in "$pages"; do + decho "Searching for \"$page\"" man_find_and_display "$page" done