1
0
Fork 0

Merge branch 'check-readtags' into 'master'

fzf-ctags: Check for readtags command

See merge request andreyorst/fzf.kak!76
This commit is contained in:
Andrey Orst 2020-03-19 05:18:57 +00:00
commit 302045491c

View file

@ -808,11 +808,21 @@ define-command -hidden fzf-tag -params ..2 %{ evaluate-commands %sh{
printf "%s\n" "echo -markup %{{Information}'$kak_opt_fzf_tag_file_name' file found at $HOME. Check if it is right tag file}" printf "%s\n" "echo -markup %{{Information}'$kak_opt_fzf_tag_file_name' file found at $HOME. Check if it is right tag file}"
fi fi
cmd="cd $path;"
if [ "$(command -v readtags)" ]; then
if [ -n "$1" ]; then if [ -n "$1" ]; then
cmd="cd $path; readtags -t $kak_opt_fzf_tag_file_name -Q '(eq? \$kind \"$1\")' -l | cut -f1" cmd="${cmd} readtags -t $kak_opt_fzf_tag_file_name -Q '(eq? \$kind \"$1\")' -l"
else else
cmd="cd $path; readtags -t $kak_opt_fzf_tag_file_name -l | cut -f1" cmd="${cmd} readtags -t $kak_opt_fzf_tag_file_name -l"
fi fi
else
if [ -n "$1" ]; then
cmd="${cmd} grep '^\b\"$1\"\b.*\$/' $kak_opt_fzf_tag_file_name -o"
else
cmd="${cmd} grep -v '^!_TAG_*' $kak_opt_fzf_tag_file_name"
fi
fi
cmd="${cmd} | cut -f1"
message="Jump to a symbol''s definition message="Jump to a symbol''s definition
<ret>: open tag in new buffer <ret>: open tag in new buffer