File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ def -hidden -params 1..2 _doc-open %{
21
21
"
22
22
23
23
if [ $# -gt 1 ]; then
24
- echo " try %{ exec '%<a-s><a-k>^\s+\S* \Q${2} \E<ret>\'' } catch %{ exec <space>gg }"
24
+ echo " try %{ exec '%<a-s><a-k>(?i)^\h+[^\n]*? \Q${2} \E<ret>\'' } catch %{ exec <space>gg }"
25
25
fi
26
26
else
27
27
echo " echo -color Error %{doc '$@ ' failed: see *debug* buffer for details}"
@@ -32,11 +32,13 @@ def -hidden -params 1..2 _doc-open %{
32
32
33
33
def -params 1 ..2 \
34
34
-shell-completion %{
35
- find " ${kak_opt_doc_path}" -type f -iname " *$@*" -printf ' %f\n'
35
+ find " ${kak_opt_doc_path}" -type f -iname " *$@*.gz" -printf ' %f\n' | while read l; do
36
+ echo " ${l%.*}"
37
+ done
36
38
} \
37
39
doc -docstring " Open a buffer containing the documentation about a given subject" %{
38
40
%sh{
39
- readonly PATH_DOC=" ${kak_opt_doc_path} /${1} "
41
+ readonly PATH_DOC=" ${kak_opt_doc_path} /${1} .gz "
40
42
41
43
shift
42
44
if [ ! -f " ${PATH_DOC} " ]; then
You can’t perform that action at this time.
0 commit comments