devaholik Posted February 17, 2013 Posted February 17, 2013 I am going a little nuts, I know I must be doing something wrong (since its not working) but I can't figure it out. I installed and configured Rumember - from terminal executing: ru pick up the milk ^Today #Personal works just fine and adds to RTM. I have then setup a workflow in Alfred that on typing 'r {query}' it would execute a shell script. I tried to different methods to get this to work: METHOD 1 ru {query} METHOD 2 shopt -s expand_aliases if [ -f "${HOME}/.bash_profile" ] ; then source "${HOME}/.bash_profile" fi ru {query} & Neither method works, no errors , nothing in bash history just blank. Any help would be great! Thanks
CarlosNZ Posted February 18, 2013 Posted February 18, 2013 Just at first glance, it looks like {query} should be quoted; ie. ru "{query}" Without that, it's probably only using the first word, ie. 'ru pick'
devaholik Posted February 18, 2013 Author Posted February 18, 2013 Tried to do that just now both of the methods above and put the query in quotes, still no go It doesn't even seem like its running the command.
jdfwarrior Posted February 18, 2013 Posted February 18, 2013 Have you checked console for any errors? Also, what about the escaping in the script? Are those options set correctly?
devaholik Posted February 18, 2013 Author Posted February 18, 2013 I tested the same script (method 2) in console script worked flawlessly. No errors are showing up - unless there is a debug for alfred I can see? Also i even tried to just execute a command in the script say: ru "test adding to milk manually" and that doesn't work. I have tried with all the different options on escaping none seem to work, here is my setup: http://screencast.com/t/HKfD6ekbsU http://screencast.com/t/qqj0jVoI I am pretty sure I am doing something wrong just wish I knew what it was
CarlosNZ Posted February 18, 2013 Posted February 18, 2013 Why don't you post your workflow here? It'll probably be something really obvious (like have you actually linked the keyword input to the script?) and you'll want to bang your head on your desk. No offence intended, you should see some of my "D'oh!" moments.
devaholik Posted February 18, 2013 Author Posted February 18, 2013 Here it is attached, remember that you will have to install and configure Rumember ( https://github.com/tpope/rumember ) Gotta love those moments Workflow: https://droplr.com/elEg
devaholik Posted February 18, 2013 Author Posted February 18, 2013 And just to through a whole other side to it if you use regular terminal from alfred it works, i.e. > ru add to milk
jdfwarrior Posted February 18, 2013 Posted February 18, 2013 Edited the bash script to run JUST ru "{query}" and it worked fine for me..
devaholik Posted February 18, 2013 Author Posted February 18, 2013 Did that and no go here - nothing happens so now the question is how do we debug the issue on my machine?
logicelf Posted September 9, 2016 Posted September 9, 2016 Bit late, but just stumbled across this. Alfred doesn't know *where* ru is located, so edit your script to include the full file path, e.g.: #!/bin/bash /usr/local/bin/ru {query} if [ $? -ne 0 ]; then echo "FAILED TO ADD!" else echo "{query}" fi
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