global: select the tag, fail nicely

This commit is contained in:
Maxime Coste 2012-06-04 14:27:56 +00:00
parent 419d5691a1
commit 546a999416

View File

@ -6,7 +6,7 @@ def -env-params \
else
tagname=${kak_selection}
fi
params=$(global --result grep ${tagname} | sed 's/\([^:]*\):\([0-9]*\):\(.*\)/"\1:\2 \3" "edit \1 \2"/')
params=$(global --result grep ${tagname} | sed "s/\([^:]*\):\([0-9]*\):\(.*\)/'\1:\2 \3' 'edit \1 \2; try exec \"20k41Xs\3<ret>\" catch echo \"could not find [\3] near \1:\2\"; exec \2g'/")
if [[ ${params} != "" ]]; then
echo "menu -auto-single $params"
else