|
Lines 47-52
Link Here
|
| 47 |
vim-plugin_pkg_postinst() { |
47 |
vim-plugin_pkg_postinst() { |
| 48 |
update_vim_helptags # from vim-doc |
48 |
update_vim_helptags # from vim-doc |
| 49 |
update_vim_afterscripts # see below |
49 |
update_vim_afterscripts # see below |
|
|
50 |
display_vim_plugin_help # see below |
| 50 |
} |
51 |
} |
| 51 |
|
52 |
|
| 52 |
vim-plugin_pkg_postrm() { |
53 |
vim-plugin_pkg_postrm() { |
|
Lines 88-90
Link Here
|
| 88 |
fi |
89 |
fi |
| 89 |
done |
90 |
done |
| 90 |
} |
91 |
} |
|
|
92 |
|
| 93 |
# Display a message with the plugin's help file if one is available. Uses the |
| 94 |
# VIM_PLUGIN_HELPFILES env var. If multiple help files are available, they |
| 95 |
# should be separated by spaces. If no help files are available, but the env |
| 96 |
# var VIM_PLUGIN_HELPTEXT is set, that is displayed instead. For multiline |
| 97 |
# help messages, VIM_PLUGIN_HELPTEXT can be an array. |
| 98 |
display_vim_plugin_help() { |
| 99 |
local h |
| 100 |
|
| 101 |
if [ -n "${VIM_PLUGIN_HELPFILES}" ] ; then |
| 102 |
einfo " " |
| 103 |
einfo "This plugin provides documentation via vim's help system. To" |
| 104 |
einfo "view it, use:" |
| 105 |
for h in ${VIM_PLUGIN_HELPFILES} ; do |
| 106 |
einfo " :help ${helpfile}" |
| 107 |
done |
| 108 |
einfo " " |
| 109 |
|
| 110 |
elif [ -n "${VIM_PLUGIN_HELPTEXT}" ] ; then |
| 111 |
einfo " " |
| 112 |
if [ ${#VIM_PLUGIN_HELPTEXT[@]} > 1 ] ; then |
| 113 |
for (( h=0 ; h < ${#VIM_PLUGIN_HELPTEXT[@]} ; h++)) ; do |
| 114 |
einfo ${VIM_PLUGIN_HELPTEXT[${h}]} |
| 115 |
done |
| 116 |
else |
| 117 |
einfo ${VIM_PLUGIN_HELPTEXT} |
| 118 |
fi |
| 119 |
einfo " " |
| 120 |
|
| 121 |
fi |
| 122 |
} |
| 123 |
|