1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-26 21:22:00 +03:00

ctags.kak: Improve shell compatibility in ctags-funcinfo

This commit is contained in:
Maxime Coste 2018-05-09 22:32:07 +10:00
parent 327d8ad759
commit 3c29bf1ea6

View File

@ -59,7 +59,7 @@ define-command ctags-funcinfo -docstring "Display ctags information about a sele
try %{ try %{
execute-keys -no-hooks '[(;B<a-k>[a-zA-Z_]+\(<ret><a-;>' execute-keys -no-hooks '[(;B<a-k>[a-zA-Z_]+\(<ret><a-;>'
%sh{ %sh{
sigs=$(readtags -e ${kak_selection%(} | grep kind:f | sed -re 's/^(\S+).*((class|struct|namespace):(\S+))?.*signature:(.*)$/\5 [\4::\1]/') sigs=$(readtags -e ${kak_selection%?} | grep kind:f | sed -re 's/^(\S+).*((class|struct|namespace):(\S+))?.*signature:(.*)$/\5 [\4::\1]/')
if [ -n "$sigs" ]; then if [ -n "$sigs" ]; then
printf %s\\n "evaluate-commands -client ${kak_client} %{info -anchor $kak_cursor_line.$kak_cursor_column -placement above '$sigs'}" printf %s\\n "evaluate-commands -client ${kak_client} %{info -anchor $kak_cursor_line.$kak_cursor_column -placement above '$sigs'}"
fi fi