View | Details | Raw Unified | Return to bug 271830 | Differences between
and this patch

Collapse All | Expand All

(-)man.sh (-16 / +17 lines)
Lines 601-619 Link Here
601
		do_apropos "$@"
601
		do_apropos "$@"
602
		exit
602
		exit
603
	fi
603
	fi
604
605
	IFS=:
606
	for sect in $man_default_sections; do
607
		if [ "$sect" = "$1" ]; then
608
			decho "Detected manual section as first arg: $1"
609
			MANSECT="$1"
610
			shift
611
			break
612
		fi
613
	done
614
	unset IFS
615
616
	pages="$*"
617
}
604
}
618
605
619
# Usage: man_setup
606
# Usage: man_setup
Lines 787-794 Link Here
787
				trim "${line#MANCONFIG}"
774
				trim "${line#MANCONFIG}"
788
				config_local="$tstr"
775
				config_local="$tstr"
789
				;;
776
				;;
790
		# Set variables in the form of FOO_BAR
777
		# Set other variables
791
		*_*[\ \	]*)	var="${line%%[\ \	]*}"
778
		*[\ \	]*)	var="${line%%[\ \	]*}"
792
				trim "${line#$var}"
779
				trim "${line#$var}"
793
				eval "$var=\"$tstr\""
780
				eval "$var=\"$tstr\""
794
				decho "    Parsed $var" 3
781
				decho "    Parsed $var" 3
Lines 1009-1019 Link Here
1009
996
1010
do_man() {
997
do_man() {
1011
	man_parse_args "$@"
998
	man_parse_args "$@"
999
	man_setup
1000
1001
	IFS=:
1002
	for sect in $MANSECT; do
1003
		if [ "$sect" = "$1" ]; then
1004
			decho "Detected manual section as first arg: $1"
1005
			MANSECT="$1"
1006
			shift
1007
			break
1008
		fi
1009
	done
1010
	unset IFS
1011
1012
	pages="$*"
1013
1012
	if [ -z "$pages" -a -z "${Kflag}" ]; then
1014
	if [ -z "$pages" -a -z "${Kflag}" ]; then
1013
		echo 'What manual page do you want?' >&2
1015
		echo 'What manual page do you want?' >&2
1014
		exit 1
1016
		exit 1
1015
	fi
1017
	fi
1016
	man_setup
1017
1018
1018
	if [ ! -z "${Kflag}" ]; then
1019
	if [ ! -z "${Kflag}" ]; then
1019
		# Short circuit because -K flag does a sufficiently
1020
		# Short circuit because -K flag does a sufficiently

Return to bug 271830