idea4IT Posted December 3, 2014 Posted December 3, 2014 Hi guys, In order to implement a "Back" button in my workflow, I've tried to use an item with an empty autocomplete attribute. Unfortunately, Alfred seems to just ignore these kind of items instead of applying the empty attribute. Here's an example: Alfred value: "gmail INBOX" Item selected: "Back" with empty autocomplete attribute Expected behavior: Alfred value changed to: "gmail " Current behavior: Alfred value: "gmail INBOX" -> nothing happens Alfred version & build number: v2.5.1 (308) OS X version: Yosemite 10.10 Is there a good reason why Alfred ignores this? Cheers, Fabio
Andrew Posted December 10, 2014 Posted December 10, 2014 Hi guys, In order to implement a "Back" button in my workflow, I've tried to use an item with an empty autocomplete attribute. Unfortunately, Alfred seems to just ignore these kind of items instead of applying the empty attribute. Here's an example: Alfred value: "gmail INBOX" Item selected: "Back" with empty autocomplete attribute Expected behavior: Alfred value changed to: "gmail " Current behavior: Alfred value: "gmail INBOX" -> nothing happens Alfred version & build number: v2.5.1 (308) OS X version: Yosemite 10.10 Is there a good reason why Alfred ignores this? Cheers, Fabio Sorry about the slow reply on this... I'm going to have to do a bit of analysis to see what's going on here. Essentially, tab auto-complete only forward completes, not backwards which is why an empty auto complete is treated as ignored. I am going to look into treating empty and nil differently to see if I can allow empty autocompletes to clear out a field. Cheers, Andrew idea4IT 1
deanishe Posted December 15, 2014 Posted December 15, 2014 This would be a pretty cool feature. In fact, I'd like to see a standard keyboard shortcut for "clear query, but leave keyword". Admittedly, ALT+BACKSPACE (delete last word) usually works, but it'd be cool to have, say, CTRL+BACKSPACE assigned in Alfred to "delete to keyword".
Andrew Posted December 16, 2014 Posted December 16, 2014 This would be a pretty cool feature. In fact, I'd like to see a standard keyboard shortcut for "clear query, but leave keyword". Admittedly, ALT+BACKSPACE (delete last word) usually works, but it'd be cool to have, say, CTRL+BACKSPACE assigned in Alfred to "delete to keyword". That's a good idea! I've added a note
Andrew Posted December 22, 2014 Posted December 22, 2014 Hi guys, In order to implement a "Back" button in my workflow, I've tried to use an item with an empty autocomplete attribute. Unfortunately, Alfred seems to just ignore these kind of items instead of applying the empty attribute. Here's an example: Alfred value: "gmail INBOX" Item selected: "Back" with empty autocomplete attribute Expected behavior: Alfred value changed to: "gmail " Current behavior: Alfred value: "gmail INBOX" -> nothing happens Alfred version & build number: v2.5.1 (308) OS X version: Yosemite 10.10 Is there a good reason why Alfred ignores this? Cheers, Fabio I've just been playing with this a bit, and it works as originally intended. If you leave out the autocomplete flag, autocomplete is ignored. If you set autocomplete to "" then it clears it back to just the keyword when you try to autocomplete. Can you show me the XML you are having an issue with? Cheers, Andrew [moving to investigating]
deanishe Posted December 22, 2014 Posted December 22, 2014 (edited) I suspect it's due to the way Alfred-Workflow (on which I think the Gmail workflow is based) works. If autocomplete is an empty string, it doesn't add the autocomplete attribute. Have you tried changing Alfred-Workflow's behaviour, Fabio? Edited December 22, 2014 by deanishe
deanishe Posted December 22, 2014 Posted December 22, 2014 Had a wee poke around, and I'm pretty sure it's Alfred-Workflow's "fault". I've been testing what happens when various elements/attributes are set to empty strings and the behaviour is a little unpredictable. @Fabio: What do you think Alfred-Workflow should do if handed empty strings?
idea4IT Posted December 22, 2014 Author Posted December 22, 2014 Sorry Andrew for not checking it myself. I think this can be closed now. Thanks! Happy holidays
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