diff runtime/ftplugin/zsh.vim @ 26708:f0d7cb510ce3

Update runtime files Commit: https://github.com/vim/vim/commit/fa3b72348d88343390fbe212cfc230fec1602fc2 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Dec 24 13:18:38 2021 +0000 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Fri, 24 Dec 2021 14:30:04 +0100
parents 29c5f168c6fd
children fee9eccee266
line wrap: on
line diff
--- a/runtime/ftplugin/zsh.vim
+++ b/runtime/ftplugin/zsh.vim
@@ -18,13 +18,13 @@ setlocal comments=:# commentstring=#\ %s
 
 let b:undo_ftplugin = "setl com< cms< fo< "
 
-if executable('zsh')
+if executable('zsh') && &shell !~# '/\%(nologin\|false\)$'
   if !has('gui_running') && executable('less')
-    command! -buffer -nargs=1 RunHelp silent exe '!MANPAGER= zsh -ic "autoload -Uz run-help; run-help <args> 2>/dev/null | LESS= less"' | redraw!
+    command! -buffer -nargs=1 RunHelp silent exe '!MANPAGER= zsh -c "autoload -Uz run-help; run-help <args> 2>/dev/null | LESS= less"' | redraw!
   elseif has('terminal')
-    command! -buffer -nargs=1 RunHelp silent exe ':term zsh -ic "autoload -Uz run-help; run-help <args>"'
+    command! -buffer -nargs=1 RunHelp silent exe ':term zsh -c "autoload -Uz run-help; run-help <args>"'
   else
-    command! -buffer -nargs=1 RunHelp echo system('zsh -ic "autoload -Uz run-help; run-help <args> 2>/dev/null"')
+    command! -buffer -nargs=1 RunHelp echo system('zsh -c "autoload -Uz run-help; run-help <args> 2>/dev/null"')
   endif
   if !exists('current_compiler')
     compiler zsh