FreeBSD Bugzilla – Attachment 119021 Details for
Bug 161475
[patch] man(1), treat pipe & files w/o slash
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
view_as_manpage.diff
view_as_manpage.diff (text/plain), 915 bytes, created by
Nali Toja
on 2011-10-10 22:50:09 UTC
(
hide
)
Description:
view_as_manpage.diff
Filename:
MIME Type:
Creator:
Nali Toja
Created:
2011-10-10 22:50:09 UTC
Size:
915 bytes
patch
obsolete
>Index: usr.bin/man/man.sh >=================================================================== >--- usr.bin/man/man.sh (revision 226114) >+++ usr.bin/man/man.sh (working copy) >@@ -404,8 +404,9 @@ man_find_and_display() { > local found_page locpath p path sect > > # Check to see if it's a file. But only if it has a '/' in >- # the filename. >+ # the filename or looks like a manpage. > case "$1" in >+ *.[0-9ln]*) ;& # fallthrough > */*) if [ -f "$1" -a -r "$1" ]; then > decho "Found a usable page, displaying that" > unset use_cat >@@ -898,12 +899,17 @@ do_apropos() { > > do_man() { > man_parse_args "$@" >- if [ -z "$pages" ]; then >+ if [ -z "$pages" -a -t 0 ]; then > echo 'What manual page do you want?' >&2 > exit 1 > fi > man_setup > >+ if [ ! -t 0 ]; then >+ decho "Displaying from stdin" >+ man_display_page >+ fi >+ > for page in $pages; do > decho "Searching for $page" > man_find_and_display "$page"
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 161475
: 119021