Use shell-candidates for ctags completion, and cache tag names in a separate file
This commit is contained in:
parent
5b7b6eebaf
commit
1119d00a96
|
@ -6,10 +6,14 @@
|
||||||
decl str-list ctagsfiles 'tags'
|
decl str-list ctagsfiles 'tags'
|
||||||
|
|
||||||
def -params 0..1 \
|
def -params 0..1 \
|
||||||
-shell-completion '
|
-shell-candidates '
|
||||||
( for tags in $(printf %s\\n "${kak_opt_ctagsfiles}" | tr \':\' \'\n\');
|
( for tags in $(printf %s\\n "${kak_opt_ctagsfiles}" | tr \':\' \'\n\'); do
|
||||||
do readtags -t "${tags}" -p "$1"
|
namecache=$(dirname ${tags})/.kak.$(basename ${tags}).namecache
|
||||||
done ) | cut -f 1 | sort | uniq' \
|
if [ -z "$(find ${namecache} -prune -newer ${tags})" ]; then
|
||||||
|
cat ${tags} | cut -f 1 | uniq > ${namecache}
|
||||||
|
fi
|
||||||
|
cat ${namecache}
|
||||||
|
done )' \
|
||||||
-docstring 'Jump to tag definition' \
|
-docstring 'Jump to tag definition' \
|
||||||
tag \
|
tag \
|
||||||
%{ %sh{
|
%{ %sh{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user