Commit Graph

12 Commits

Author SHA1 Message Date
Fabian Homborg
5814b1b8e2 Fix man function for NetBSD
NetBSD's man is unusual in that it doesn't understand an empty
$MANPATH component as "the system man path", and doesn't have a
`manpath` or `man --path`.

It has a `-m` option that would be useful, but other mans also have a
`-m` option that isn't, so detecting it is tough.

It does have a `-p` option that almost does what one would want here,
so we hack around it to make things work.

Fixes #5657.

[ci skip]
2019-02-14 10:57:38 +01:00
Fabian Homborg
f0aa63cc11 man: Use new data_dir variable name 2018-11-29 20:28:29 +01:00
Bjorn Neergaard
958e46882f Slightly restructure man.fish for clarity
man.fish can be clarified a bit, by removing a superfluous early return. Additionally, performance can be
(ever so slightly) improved, by using the empty string to suffix an extra colon when `$MANPATH` is empty, as
described in `manpath(1)`. As `man` will internally call `manpath` as it starts, this eliminates a redundancy.
2018-11-29 15:29:18 +01:00
Mahmoud Al-Qudsi
59197d12e0 Better handling of cases where man is not installed
Thanks to @floam, adapted to reduce nesting.

Works around override of command-not-found handler in previous solution
(c.f. 13e025bdb0).
2018-11-17 22:05:48 -06:00
Mahmoud Al-Qudsi
13e025bdb0 Clean up error message for man wrapper when man isn't installed
Closes #5329
2018-11-16 20:04:43 -06:00
Mahmoud Al-Qudsi
c51abd04ff Clean up $__fish_*dir variable names
Closes #4429
2018-03-12 08:34:20 -05:00
Kurtis Rader
8caab103d8 harden man against undef vars 2017-07-04 13:56:35 -07:00
Kurtis Rader
11a60c8374 reformat all fish scripts
I hate doing this but I am tired of touching a fish script as part of
some change and having `make style` radically change it. Which makes
editing fish scripts more painful than it needs to be. It is time to do
a wholesale reformatting of these scripts to conform to the documented
style as implemented by the `fish_indent` program.
2016-11-27 21:27:22 -08:00
David Adam
57e22e87c2 functions/man.fish: add fish into MANPATH even if it is already set
Closes #2443.
2015-10-09 21:01:59 +08:00
sra
0efa211a05 Use manpath instead of man --path in man.fish function (as in commit
c7941fc).
2013-10-03 11:46:58 +02:00
ridiculousfish
818533f9f0 Add a newline to prevent a comment from being cut off 2013-02-01 17:15:35 -08:00
ridiculousfish
ff7cbab991 Add man function to promote fish's man pages so it can serve as a suitable replacement for help 2013-02-01 17:11:22 -08:00