Skip to content

Commit d92c241

Browse files
committed
Make doc command work without requiring installation
1 parent b59714b commit d92c241

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

rc/doc.kak rc/base/doc.kak

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
2-
decl str doc_path "/usr/share/doc/kak/manpages"
3-
41
def -hidden -params 1..2 _doc-open %{
52
%sh{
63
manout=$(mktemp /tmp/kak-man-XXXXXX)
74
colout=$(mktemp /tmp/kak-man-XXXXXX)
85
9-
MANWIDTH=${kak_window_width} man -l "$1" > $manout
6+
MANWIDTH=${kak_window_width} man "$1" > $manout
107
retval=$?
118
129
col -b -x > ${colout} < ${manout}
@@ -32,13 +29,13 @@ def -hidden -params 1..2 _doc-open %{
3229

3330
def -params 1..2 \
3431
-shell-completion %{
35-
find "${kak_opt_doc_path}" -type f -iname "*$@*.gz" -printf '%f\n' | while read l; do
32+
find "${kak_runtime}/../doc/kak/manpages/" -type f -iname "*$@*.gz" -printf '%f\n' | while read l; do
3633
echo "${l%.*}"
3734
done
3835
} \
3936
doc -docstring "Open a buffer containing the documentation about a given subject" %{
4037
%sh{
41-
readonly PATH_DOC="${kak_opt_doc_path}/${1}.gz"
38+
readonly PATH_DOC="${kak_runtime}/../doc/kak/manpages/${1}.gz"
4239
4340
shift
4441
if [ ! -f "${PATH_DOC}" ]; then

share/doc/kak/manpages

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../doc/manpages

0 commit comments

Comments
 (0)