forked from aniani/vim
runtime(man): man on AIX does not understand -l
fixes: #13847 Co-authored-by: Ken Takata <kentkt@csc.jp> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
parent
46d67d22b9
commit
f942db2557
20
runtime/autoload/dist/man.vim
vendored
20
runtime/autoload/dist/man.vim
vendored
@ -3,7 +3,7 @@
|
|||||||
" Maintainer: Jason Franklin <jason@oneway.dev>
|
" Maintainer: Jason Franklin <jason@oneway.dev>
|
||||||
" Maintainer: SungHyun Nam <goweol@gmail.com>
|
" Maintainer: SungHyun Nam <goweol@gmail.com>
|
||||||
" Autoload Split: Bram Moolenaar
|
" Autoload Split: Bram Moolenaar
|
||||||
" Last Change: 2023 Jun 28
|
" Last Change: 2024 Jan 17 (make it work on AIX, see #13847)
|
||||||
|
|
||||||
let s:cpo_save = &cpo
|
let s:cpo_save = &cpo
|
||||||
set cpo-=C
|
set cpo-=C
|
||||||
@ -13,14 +13,26 @@ let s:man_tag_depth = 0
|
|||||||
let s:man_sect_arg = ""
|
let s:man_sect_arg = ""
|
||||||
let s:man_find_arg = "-w"
|
let s:man_find_arg = "-w"
|
||||||
try
|
try
|
||||||
if !has("win32") && $OSTYPE !~ 'cygwin\|linux' && system('uname -s') =~ "SunOS" && system('uname -r') =~ "^5"
|
if !has("win32") && $OSTYPE !~ 'cygwin\|linux'
|
||||||
let s:man_sect_arg = "-s"
|
" cache the value
|
||||||
let s:man_find_arg = "-l"
|
let uname_s = system('uname -s')
|
||||||
|
|
||||||
|
if uname_s =~ "SunOS" && system('uname -r') =~ "^5"
|
||||||
|
" Special Case for Man on SunOS
|
||||||
|
let s:man_sect_arg = "-s"
|
||||||
|
let s:man_find_arg = "-l"
|
||||||
|
elseif uname_s =~? 'AIX'
|
||||||
|
" Special Case for Man on AIX
|
||||||
|
let s:man_sect_arg = ""
|
||||||
|
let s:man_find_arg = ""
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
catch /E145:/
|
catch /E145:/
|
||||||
" Ignore the error in restricted mode
|
" Ignore the error in restricted mode
|
||||||
endtry
|
endtry
|
||||||
|
|
||||||
|
unlet! uname_s
|
||||||
|
|
||||||
func s:ParseIntoPageAndSection()
|
func s:ParseIntoPageAndSection()
|
||||||
" Accommodate a reference that terminates in a hyphen.
|
" Accommodate a reference that terminates in a hyphen.
|
||||||
"
|
"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user