Merge branch 'check-readtags' into 'master'
fzf-ctags: Check for readtags command See merge request andreyorst/fzf.kak!76
This commit is contained in:
commit
302045491c
1 changed files with 13 additions and 3 deletions
|
@ -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}"
|
||||
fi
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
cmd="cd $path; readtags -t $kak_opt_fzf_tag_file_name -Q '(eq? \$kind \"$1\")' -l | cut -f1"
|
||||
cmd="cd $path;"
|
||||
if [ "$(command -v readtags)" ]; then
|
||||
if [ -n "$1" ]; then
|
||||
cmd="${cmd} readtags -t $kak_opt_fzf_tag_file_name -Q '(eq? \$kind \"$1\")' -l"
|
||||
else
|
||||
cmd="${cmd} readtags -t $kak_opt_fzf_tag_file_name -l"
|
||||
fi
|
||||
else
|
||||
cmd="cd $path; readtags -t $kak_opt_fzf_tag_file_name -l | cut -f1"
|
||||
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
|
||||
<ret>: open tag in new buffer
|
||||
|
|
Loading…
Reference in a new issue