runtime(sh): Update ftplugin (#13213) · vim/vim@2a281cc

Original file line numberDiff line numberDiff line change

@@ -3,7 +3,8 @@

33

" Maintainer: Doug Kearns <dougkearns@gmail.com>

44

" Previous Maintainer: Dan Sharp

55

" Contributor: Enno Nagel <ennonagel+vim@gmail.com>

6-

" Last Change: 2023 Aug 29

6+

" Eisuke Kawashima

7+

" Last Change: 2023 Sep 28

78
89

if exists("b:did_ftplugin")

910

finish

@@ -39,16 +40,16 @@ if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")

3940

let b:undo_ftplugin ..= " | unlet! b:browsefilter"

4041

endif

4142
42-

if (exists("b:is_bash") && (b:is_bash == 1))

43+

if get(b:, "is_bash", 0)

4344

if !has("gui_running") && executable("less")

44-

command! -buffer -nargs=1 Help silent exe '!bash -c "{ help "<args>" 2>/dev/null || man "<args>"; } | LESS= less"' | redraw!

45-

elseif has('terminal')

46-

command! -buffer -nargs=1 Help silent exe ':term bash -c "help "<args>" 2>/dev/null || man "<args>""'

45+

command! -buffer -nargs=1 ShKeywordPrg silent exe '!bash -c "{ help "<args>" 2>/dev/null || man "<args>"; } | LESS= less"' | redraw!

46+

elseif has("terminal")

47+

command! -buffer -nargs=1 ShKeywordPrg silent exe ':term bash -c "help "<args>" 2>/dev/null || man "<args>""'

4748

else

48-

command! -buffer -nargs=1 Help echo system('bash -c "help <args>" 2>/dev/null || man "<args>"')

49+

command! -buffer -nargs=1 ShKeywordPrg echo system('bash -c "help <args>" 2>/dev/null || man "<args>"')

4950

endif

50-

setlocal keywordprg=:Help

51-

let b:undo_ftplugin ..= " | setl kp< | sil! delc -buffer Help"

51+

setlocal keywordprg=:ShKeywordPrg

52+

let b:undo_ftplugin ..= " | setl kp< | sil! delc -buffer ShKeywordPrg"

5253

endif

5354
5455

let &cpo = s:save_cpo