add rc/global.kak file which provides the tag command using GNU GLOBAL

This commit is contained in:
Maxime Coste 2012-05-18 05:23:02 +00:00
parent 5f2471c147
commit 05442857e6

12
src/rc/global.kak Normal file
View File

@ -0,0 +1,12 @@
def -env-params tag eval \
`if [[ ${kak_param0} != "" ]]; then
tagname=${kak_param0}
else
tagname=${kak_selection}
fi
params=$(global --result grep ${tagname} | sed 's/\([^:]*\):\([0-9]*\):\(.*\)/"\1:\2 \3" "edit \1 \2"/')
if [[ ${params} != "" ]]; then
echo "menu $params"
else
echo echo tag ${tagname} not found
fi`