summaryrefslogtreecommitdiffstats
path: root/runtime/autoload/dist/man.vim
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:39:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:40:16 +0000
commit6af24b2457752c0d36aaf9f29f03d39afd09937f (patch)
tree2671b594908d1f971de6b2a2d473f97dfb7291d2 /runtime/autoload/dist/man.vim
parentReleasing progress-linux version 2:9.1.0016-1~progress7.99u1. (diff)
downloadvim-6af24b2457752c0d36aaf9f29f03d39afd09937f.tar.xz
vim-6af24b2457752c0d36aaf9f29f03d39afd09937f.zip
Merging upstream version 2:9.1.0199.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'runtime/autoload/dist/man.vim')
-rw-r--r--runtime/autoload/dist/man.vim20
1 files changed, 16 insertions, 4 deletions
diff --git a/runtime/autoload/dist/man.vim b/runtime/autoload/dist/man.vim
index 7f7d137..708e106 100644
--- a/runtime/autoload/dist/man.vim
+++ b/runtime/autoload/dist/man.vim
@@ -3,7 +3,7 @@
" Maintainer: Jason Franklin <jason@oneway.dev>
" Maintainer: SungHyun Nam <goweol@gmail.com>
" 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
set cpo-=C
@@ -13,14 +13,26 @@ let s:man_tag_depth = 0
let s:man_sect_arg = ""
let s:man_find_arg = "-w"
try
- if !has("win32") && $OSTYPE !~ 'cygwin\|linux' && system('uname -s') =~ "SunOS" && system('uname -r') =~ "^5"
- let s:man_sect_arg = "-s"
- let s:man_find_arg = "-l"
+ if !has("win32") && $OSTYPE !~ 'cygwin\|linux'
+ " cache the value
+ 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
catch /E145:/
" Ignore the error in restricted mode
endtry
+unlet! uname_s
+
func s:ParseIntoPageAndSection()
" Accommodate a reference that terminates in a hyphen.
"