alfred-bear icon indicating copy to clipboard operation
alfred-bear copied to clipboard

Spike on how multi-word tags are going to work

Open chrisbro opened this issue 8 years ago • 2 comments
trafficstars

My regex-fu is not quite strong enough to make this easy. Need to figure out how best to support multi-word tags without screwing everything up.

chrisbro avatar Jun 28 '17 12:06 chrisbro

It looks like this is almost working (in your latest GitHub release). Its just that the url to bear needs UTF8 encoding (to replace spaces with %20). Happy to attach pull request, but it seems to work with two quick changes:

  1. Replaced the bash code following the bst script filter with:
query="{query}"

if [[ $query == ":t:"* ]]; then
	printf "bear://x-callback-url/open-tag?name=%s" "${query:3}"
else
	printf "bear://x-callback-url/open-note?id=%s" "${query:3}"
fi
  1. Fed the output of this into a new 'Open URL' block.

robwalton avatar Apr 01 '18 19:04 robwalton

@robwalton Thanks a ton for the tip!

chrisbro avatar Jun 09 '18 13:06 chrisbro