runtime(man): man on AIX does not understand -l

Commit: 
https://github.com/vim/vim/commit/f942db25571e64d413048fcfd9719fdf63a516c6
Author: Christian Brabandt <[email protected]>
Date:   Wed Jan 17 21:50:16 2024 +0100

    runtime(man): man on AIX does not understand -l
    
    fixes: https://github.com/vim/vim/issues/13847
    
    Co-authored-by: Ken Takata <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/runtime/autoload/dist/man.vim b/runtime/autoload/dist/man.vim
index 7f7d13711..708e1062b 100644
--- a/runtime/autoload/dist/man.vim
+++ b/runtime/autoload/dist/man.vim
@@ -3,7 +3,7 @@
 " Maintainer:  Jason Franklin <[email protected]>
 " Maintainer:  SungHyun Nam <[email protected]>
 " 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.
   "

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1rQD11-00HIYc-Ha%40256bit.org.

Raspunde prin e-mail lui