nikffm Posted May 7, 2017 Posted May 7, 2017 (edited) I try to create a workflow, that lists search_results and opens the relevant gitlab-markdown script on select. Therefore I want to use link-anchors to jump to the correct section in the markdown file. Therefore I used something like: wf.add_item(title=src['content'], icon=u'imgs/{}.png'.format(src['file'].split(".",1)[0]), subtitle=subtitle, arg='aws.md#s3', valid=True) However my link aws.md#s3 gets replaced with the ASCI-Encoding (https://www.w3schools.com/tags/ref_urlencode.asp) when used by the "open url"-step, so in this case: aws.md%23s3. This format does not work on gitlab. How can I prevent the replacement of # with %23? Edited May 7, 2017 by nikffm
deanishe Posted May 8, 2017 Posted May 8, 2017 It has nothing to do with ASCII. Alfred is URL-encoding your arg, as it has no way of knowing whether your input is already correctly encoded or not. The solution is to not use the Open URL action. Instead, use a normal Run Script action (Language = /bin/bash, with input as argv) with the following content: open "$1"
nikffm Posted May 8, 2017 Author Posted May 8, 2017 actually I had to use open "{query}" in a bash script, but this way it works. Thanks
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now