mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-03 06:41:14 -03:00
functions/man: Pass "-l" to get man to open a file
Supported by mandoc, man-db and NetBSD man, and mandoc now requires this. Fixes #12037
This commit is contained in:
@@ -62,7 +62,8 @@ function man
|
||||
if not set -q argv[2] && status list-files "man/man1/$argv[1].1" &>/dev/null
|
||||
set -l basename $argv[1].1
|
||||
function __fish_man -V basename -a man1
|
||||
command man $man1/$basename
|
||||
# mandoc man needs "-l" or it'll refuse to open a file
|
||||
command man -l $man1/$basename
|
||||
end
|
||||
__fish_data_with_directory man/man1 \
|
||||
(string escape --style=regex -- $basename) __fish_man
|
||||
|
||||
Reference in New Issue
Block a user