aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/man
Commit message (Collapse)AuthorAgeFilesLines
* man: the exists function needs to validate the first parameterWolfram Schneider2024-05-201-0/+4
| | | | | | | | | | | This fixes an issue with the ".so " macro for FreeBSD ports manual pages. PR: 275978 Reported by: Jamie Landeg-Jones <jamie@catflap.org> MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45231 (discussion)
* man: do not ignore the exit status of roff toolsWolfram Schneider2024-04-201-1/+7
| | | | | | PR: 223516 Approved by: emaste, bapt Differential Revision: https://reviews.freebsd.org/D44798
* man: fix redirect for locales and file argumentsMohamed Akram2024-02-031-6/+11
| | | | | | | | | Use the locale-specific path for localized pages and the appropriate parent directory for file arguments when handling redirects. Signed-off-by: Mohamed Akram <mohd.akram@outlook.com> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1019
* man: support special characters in filenamesWolfram Schneider2024-01-251-6/+6
| | | | | | | | | | | man.sh needs to handle double quotes and sub shell character as '`' '$' etc. PR: 275967 Reviewed by: bapt MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43453
* man: avoid unportable use of utilitiesMohamed Akram2024-01-151-3/+3
| | | | | | | | | | | | echo -e is not portable. It can be replaced by printf %b (it works only with the /bin/sh built-in echo, not /bin/echo anyway). head -# is not portable, but head -n # is. Replace these two things in three places total. Signed-off-by: Mohamed Akram <mohd.akram@outlook.com> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1062
* man(1): support spaces in filenamesWolfram Schneider2024-01-131-12/+16
| | | | | | | | The globbing function in exists() needs to handle white spaces. PR: 275978 Reviewed by: kevans, bapt, emaste MFC after: 1 week
* fix using man(1) with multiple pagesWolfram Schneider2024-01-081-1/+1
| | | | | | | PR: 275978 Reported by: Mohamed Akram Fixes: 789480702e490818244af11279868ba4f3dabe6b MFC after: 1 week
* support spaces in filenamesWolfram Schneider2023-12-281-13/+13
| | | | | PR: 275978 MFC after: 1 week
* improve handling of shell metacharacters in filenamesWolfram Schneider2023-12-271-11/+11
| | | | | PR: 275967 MFC after: 1 week
* switch groff parameter -man to -mandoc for new groff release 1.23.0Wolfram Schneider2023-09-071-2/+2
| | | | PR: 273565
* switch groff parameter -man to -mandocWolfram Schneider2023-09-071-2/+2
| | | | | | | | | | | | groff 1.23.0 changed the semantics of the -man parameter, and many manual pages are not rendered. The -mandoc parameter brings back the old behavior, as in groff 1.22.4 and earlier. PR: 273565, 273245 Reviewed by: emaste, bapt MFC after: 1 week for all supported branches (stable/12, 13, 14) Differential Revision: https://reviews.freebsd.org/D41737
* Remove $FreeBSD$: two-line nroff patternWarner Losh2023-08-163-6/+0
| | | | Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-163-3/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* man: fix `man -K` searchEd Maste2023-08-021-3/+3
| | | | | | | | | | Quote re arg to grep in case it has spaces, and quote [:blank:] tr arg to avoid the shell interpreting []. PR: 272729 Reviewed by: Mina Galić <freebsd@igalic.co> Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41282
* man(1): use gzcat for .gz filesMohamed Akram2023-07-041-1/+1
| | | | | | | | | | | POSIX zcat appends the .Z suffix to file arguments causing the command to fail with .gz files. Signed-off-by: Mohamed Akram <mohd.akram@outlook.com> Reviewed by: markj MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/789
* man(1): Support custom sectionsMohamed Akram2023-06-271-25/+45
| | | | | | | PR: 271830 Signed-off-by: Mohamed Akram <mohd.akram@outlook.com> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/764
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-121-1/+1
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* man(1): Support zstd compressed manpages using zstdcatCameron Katri2023-01-301-0/+1
| | | | | | Reviewed by: emaste, markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D32296
* do not expect mandoc(1) to terminate in finite timeWolfram Schneider2022-12-271-0/+6
| | | | PR: 266868
* Indicate that xrefs to *roff,tbl,eqn et al are found in ports/textproc/groff.Jens Schweikhardt2022-08-151-10/+10
|
* man(1): Add full search (-K) flagFernando Apesteguía2022-01-262-5/+63
| | | | | | | | | | | | | | | | | | | | | | This flag allows a full text search on man pages. Although this is a last resort option, it can be useful to pin point a certain man page. It can be used with -S to narrow the search. Unlike the Linux version, the search takes place in the rendered text so it avoids false-positives when the text is found in comments in the source files. It relies on `grep(1)` and `mandoc(1)` to do its job. Add flag documentation and EXAMPLES to the manual page (bump .Dd). Usage example: man -w -K '\<arm\>' -S 1:8 Reviewed By: ceri, emaste, pauamma_gundo.com Approved by: manpages (bcr@), debdrup@ Differential Revision: https://reviews.freebsd.org/D30984
* man: reset OPTIND before parsing argsKyle Evans2021-09-231-0/+4
| | | | | | | | | | | | | | | | | | From jilles: POSIX requires that a script set `OPTIND=1` before using different sets of parameters with `getopts`, or the results will be unspecified. The specific problem observed here is that we would execute `man -f` or `man -k` without cleaning up state from man_parse_args()' `getopts` loop. FreeBSD's /bin/sh seems to reset OPTIND to 1 after we hit the second getopts loop, rendering the following shift harmless; other /bin/sh implementations will leave it at what we came into the loop at (e.g., bash as /bin/sh), shifting off any keywords that we had. Input from: jilles Reviewed by: allanjude, bapt, imp Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D32063
* man(1): Bump .DdFernando Apesteguía2021-01-091-1/+1
| | | | From commit df965a6829f058b7a9999c39bc229616520645c2
* man(1): Add EXAMPLES sectionFernando Apesteguía2021-01-091-0/+35
| | | | | | | | Add some examples showing the use of the flags: a, k, P, w Reviewed by: gbe@, yuripv@ Approved by: manpages (gbe@) Differential Revision: https://reviews.freebsd.org/D27545
* Update the list of searched manual sections after r367013Mateusz Piotrowski2020-10-281-2/+2
| | | | Notes: svn path=/head/; revision=367110
* flua: Add a libjail moduleRyan Moeller2020-10-242-1/+2
| | | | | | | | | | | | | | | libjail is pretty small, so it makes for a good proof of concept demonstrating how a system library can be wrapped to create a loadable Lua module for flua. * Introduce 3lua section for man pages * Add libjail module Reviewed by: kevans, manpages Relnotes: yes Differential Revision: https://reviews.freebsd.org/D26080 Notes: svn path=/head/; revision=367013
* Teach man(1) about C.UTF-8.Yuri Pankov2018-11-041-6/+14
| | | | | | | | | | | | While here, use LANG as the proper source to select man pages language/encoding, falling back to LC_CTYPE. Reviewed by: bapt Approved by: kib (mentor, implicit) Differential Revision: https://reviews.freebsd.org/D17835 Notes: svn path=/head/; revision=340128
* Switch the default pager for most commands to lessAlan Somers2018-08-082-4/+4
| | | | | | | | | | | | Finally, a pager for the nineties. MFC after: Never Relnotes: Yes Differential Revision: https://reviews.freebsd.org/D13465 Poll: https://reviews.freebsd.org/V7 Notes: svn path=/head/; revision=337497
* Clean up .Xrs in man(1).Edward Tomasz Napierala2018-04-251-4/+3
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=332999
* man(1): document exit codeEitan Adler2017-12-311-0/+2
| | | | | | | | | | | man(1) uses standard exit codes, document that. PR: 223517 Reported by: wosch MFC after: 1 week Notes: svn path=/head/; revision=327396
* Only skip looking for manpages if both man directory and cat directoryBaptiste Daroussin2017-12-041-1/+1
| | | | | | | | | | | | | are not existing. This allows man(1) to read catpages when no man directories are available at all PR: 223559 Reported by: wosch MFC after: 3 days Notes: svn path=/head/; revision=326527
* In case man(1) found a catpage to display skip looking ".so" which is manpageBaptiste Daroussin2017-12-041-0/+3
| | | | | | | | | | | | | | | | | | | | only. In case we are trying to read a catpage, the manpage variable is not defined. It results in the "cattool" having no arguments. In case the catpage is compressed, the cattool used is "zcat" which dies if the standard input is a terminal, meaning the function calling it is exiting as if there were no ".so" In case the catpage is uncompressed, the cattool used is "zcat -f" which waits reading standard input, making the man(1) command hang. PR: 223560 Reported by: wosch MFC after: 3 days Notes: svn path=/head/; revision=326526
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326276
* man(1): silent the output of mandoc when testingBaptiste Daroussin2017-09-291-1/+1
| | | | | | | | | | | This reduce the spam a user may face when mandoc tries to figure out if it can renders a manpage or fallback on groff(1) Reported by: bdrewery MFC after: 3 days Notes: svn path=/head/; revision=324100
* - Remove separate handling of /bin and /usr/bin in manpath. They are noTijl Coosemans2017-03-122-29/+17
| | | | | | | | | | | | longer a special case. - Prefer PREFIX/share/man over PREFIX/man. - Add /usr/local/share/man to man_default_path. - Update manpath man page. Reviewed by: bapt Notes: svn path=/head/; revision=315142
* Remove the WITHOUT_MANDOCDB optionBaptiste Daroussin2017-03-112-97/+0
| | | | | | | | mandoc database is activated since FreeBSD 11.0, let's remove the previous database format for FreeBSD 12.0 Notes: svn path=/head/; revision=315057
* Remove the warning when MANPATH is set in the environmentBaptiste Daroussin2017-03-111-4/+0
| | | | | | | | | | | | | The MANPATH environment variable behaviour is documented properly in the manpage and it now has extended to new feature that allows to make MANPATH env variable extending the default search path rather than overwriting it making the warning painful Reported by: kargl MFC after: 1 week Notes: svn path=/head/; revision=315056
* Extend functionality MANPATH in man(1) to followup with apropos(1) fromBaptiste Daroussin2017-03-112-9/+41
| | | | | | | | | | | | | | | | | mandoc. If MANPATH begins with a colon, it is appended to the default list; if it ends with a colon, it is prepended to the default list; or if it contains two adjacent colons, the standard search path is inserted between the colons. If none of these conditions are met, it overrides the standard search path. Import the MANPATH description from mandoc into the man(1) man page Reported by: kargl MFC after: 1 week Notes: svn path=/head/; revision=315054
* Add share/man if it exists to the MANPATHBaptiste Daroussin2017-03-111-0/+2
| | | | | | | | | | localbase is not consistent with base for manpages: /usr/local/man vs /usr/share/man adding share/man allows to fix that inconsistency and would permit to remove tons of patches/modifications in the ports tree Notes: svn path=/head/; revision=315053
* Update MACHINE/MACHINE_ARCH examples to use arm64/aarch64 instead of i386/pc98Enji Cooper2017-01-291-5/+5
| | | | | | | pc98 support was removed in r312910 Notes: svn path=/head/; revision=312941
* Restore man -t for manpages rendered by mandocBaptiste Daroussin2015-09-191-1/+5
| | | | | | | Reported by: swills Notes: svn path=/head/; revision=287987
* inode should be different to actually mean mandocdb is in usedBaptiste Daroussin2015-07-241-2/+2
| | | | | | | Sponsored by: gandi.net Notes: svn path=/head/; revision=285836
* Fix man -k with mandocdbBaptiste Daroussin2015-07-241-0/+4
| | | | | | | | | | | | If apropos(1) and whatis(1) are not hardlinks to man(1) that means the system is using mandocdb, then man -k should spawn apropos(1) and/or whatis(1) directly Reported by: kevlo Tested by: kevlo Sponsored by: gandi.net Notes: svn path=/head/; revision=285835
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-272-18/+59
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=283595
| * \ Merge from head@274682Simon J. Gerraty2014-11-191-1/+31
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=274683
| * | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | Sync with HEAD.David E. O'Brien2013-02-082-2/+2
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246555
| * \ \ \ Sync from headSimon J. Gerraty2012-11-041-3/+4
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545