FreeBSD Bugzilla – Attachment 242613 Details for
Bug 271830
man: ignores MANSECT and -S
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
fix issues in last patch
patch-man.diff (text/plain), 1.88 KB, created by
Mohamed Akram
on 2023-06-05 10:42:31 UTC
(
hide
)
Description:
fix issues in last patch
Filename:
MIME Type:
Creator:
Mohamed Akram
Created:
2023-06-05 10:42:31 UTC
Size:
1.88 KB
patch
obsolete
>--- man.sh.orig 2023-06-05 14:05:37 >+++ man.sh 2023-06-05 14:39:05 >@@ -548,9 +548,9 @@ > fi > } > >-# Usage: man_parse_args "$@" >+# Usage: man_parse_opts "$@" > # Parses commandline options for man. >-man_parse_args() { >+man_parse_opts() { > local IFS cmd_arg > > OPTIND=1 >@@ -575,8 +575,6 @@ > esac > done >&2 > >- shift $(( $OPTIND - 1 )) >- > # Check the args for incompatible options. > > case "${Kflag}${fflag}${kflag}${tflag}${wflag}" in >@@ -601,19 +599,6 @@ > do_apropos "$@" > exit > fi >- >- IFS=: >- for sect in $man_default_sections; do >- if [ "$sect" = "$1" ]; then >- decho "Detected manual section as first arg: $1" >- MANSECT="$1" >- shift >- break >- fi >- done >- unset IFS >- >- pages="$*" > } > > # Usage: man_setup >@@ -634,12 +619,6 @@ > > setup_pager > >- # Setup manual sections to search. >- if [ -z "$MANSECT" ]; then >- MANSECT=$man_default_sections >- fi >- decho "Using manual sections: $MANSECT" >- > build_manpath > man_setup_locale > man_setup_width >@@ -787,6 +766,10 @@ > trim "${line#MANCONFIG}" > config_local="$tstr" > ;; >+ MANSECT*) decho " MANSECT" 3 >+ trim "${line#MANSECT}" >+ if [ -z "$MANSECT" ]; then MANSECT="$tstr"; fi >+ ;; > # Set variables in the form of FOO_BAR > *_*[\ \ ]*) var="${line%%[\ \ ]*}" > trim "${line#$var}" >@@ -1008,12 +991,34 @@ > } > > do_man() { >- man_parse_args "$@" >+ man_parse_opts "$@" >+ shift $(( $OPTIND - 1 )) >+ >+ man_setup >+ >+ if [ -z "$MANSECT" ]; then >+ MANSECT=$man_default_sections >+ fi >+ >+ decho "Using manual sections: $MANSECT" >+ >+ IFS=: >+ for sect in $MANSECT; do >+ if [ "$sect" = "$1" ]; then >+ decho "Detected manual section as first arg: $1" >+ MANSECT="$1" >+ shift >+ break >+ fi >+ done >+ unset IFS >+ >+ pages="$*" >+ > if [ -z "$pages" -a -z "${Kflag}" ]; then > echo 'What manual page do you want?' >&2 > exit 1 > fi >- man_setup > > if [ ! -z "${Kflag}" ]; then > # Short circuit because -K flag does a sufficiently
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 271830
:
242606
|
242612
|
242613
|
242614