From nobody Fri Jan 05 08:21:18 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 4T5xHg1XKjz56TmS; Fri, 5 Jan 2024 08:21:19 +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 4T5xHg15MSz45LT; Fri, 5 Jan 2024 08:21:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704442879; 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=B4fCYrdqHXmga/5gc9phtcZwUT41E9cBIjuu8+wK93U=; b=vtpTlM3kkVRMXV4A/6wVHLMOE0b9SdPKTgrtLzpox17a/r7tXUvJNx4uCUbK80po/WRp/z h5bWtf2ihgcm/P3HM1heaSihWdKqMqUGakcFOknLpJaC73Q+HwQruWe3B/0ShqLTQhtd9Z 4mzGTyzzKKBCdQ/yUkWD3sUQ+Us+j3i4kgpS6kCJGQ54UMCr/cf8q2nJQpcvt1hUO5DD5Z BAlvdheJy6obpmIOHu9lvPB/cEwp6UdsL6XMOh3jdFBKrqFjfMWDE5Bt/UnW5hcU6lA3W/ FLiLXPpaoJavtXiYq3E+3ixUBycDd/xhOX3Crbu4ExEuJm/dJJ+clrmOog7TSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704442879; 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=B4fCYrdqHXmga/5gc9phtcZwUT41E9cBIjuu8+wK93U=; b=l3Hnj2Q7rk6egrv4DqD2DGJeFQfJRUhQz0w66RBXT8klQBVpQqvI6g3D6Mtt7ATdl726OI EF/BcB4W4pyvRezKoeoZVTbjWOB2M3d2x/8orTpW2XBcM17J3bzuKU/jjOLUrCYTtT9hMH 1RfJ9OUqMJ7T2roqzHVqJHyj6f+zR1axpj0iDzn3qE0fsh8JRavqF8d7bsVBYsRyVlefIa Je0u5y4s5oI4ucf/GNGCfK5VUYbuBuNdjKAuGmZJ3bLqv4nB1P1VY+WhUpjvjkV5mKdCT0 0beWf1YmNxQGn2yWR8a16/ZxxXnDxxgP0/uPt5FJAYlO5ZuANUBKJmEr3eQtTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704442879; a=rsa-sha256; cv=none; b=KmRNNn3m5FSa4xywPPI4Y2VDw/Sx2BJ2+E35++H3S5utXmrELEDkXjQkbDFHZut4mhfejn yK/tTJ6h+P5FyDk8oU9T5nXtmJPACbf2lRBDzAv2aZNeai9VG0+E30lFE3EsiCWRn39nqw KkaK5+CMx4mMSH73BRJ6MbadBgXATv0QwCIXW96FIlu+ghIRwra5U0YzSNUfv020JkY5cN ED8ZoZsSCeGdhBcOhcUmYNLFe+I0pqpLmtGSM5kYwztreQa14ATQNZu70Uh2vEZk4nOosD EWrI8ngYhEMNApc8NP03NGIwiAPIOJgUr0w6MVlbzWHThHA1u6uheb/l5jrmRA== 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 4T5xHg08hpzqH6; Fri, 5 Jan 2024 08:21:19 +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 4058LIgk028041; Fri, 5 Jan 2024 08:21:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4058LIOY028038; Fri, 5 Jan 2024 08:21:18 GMT (envelope-from git) Date: Fri, 5 Jan 2024 08:21:18 GMT Message-Id: <202401050821.4058LIOY028038@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: d93d7230fa70 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: d93d7230fa708a8e86b68d9d70f403ff8b8a6050 Auto-Submitted: auto-generated The branch stable/14 has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=d93d7230fa708a8e86b68d9d70f403ff8b8a6050 commit d93d7230fa708a8e86b68d9d70f403ff8b8a6050 Author: Wolfram Schneider AuthorDate: 2023-12-28 10:50:29 +0000 Commit: Wolfram Schneider CommitDate: 2024-01-05 08:21:05 +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 87594699b2c2..66af46a36243 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -158,14 +158,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 @@ -308,7 +308,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" @@ -338,7 +338,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 @@ -496,8 +496,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 @@ -516,7 +516,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 @@ -530,7 +530,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 @@ -543,7 +543,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 @@ -560,7 +560,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 @@ -1040,8 +1040,8 @@ do_man() { do_full_search "${REGEXP}" fi - for page in $pages; do - decho "Searching for $page" + for page in "$pages"; do + decho "Searching for \"$page\"" man_find_and_display "$page" done