Jump to content


  • Content Count

  • Joined

  • Last visited

About johnjddoe

  • Rank

Recent Profile Visitors

337 profile views
  1. Bump! I think this would be a really useful feature to have. At the very least, I think Alfred should not show out of date results - e.g. if you type 'avengers' and the script returns results for 'a', Alfred just ignores those results and then reruns the script with 'avengers'.
  2. Alfred's built-in dictionary is great, but often the subtext area is too small to be able to read the full definition. It would be fantastic if you could quick-look the result (just press Shift) and then it would show a small popup that showed the full definition, either like the quick look for a text file or like Alfred's large text overlay.
  3. I've filed a feature request here. Not quite sure what you mean by the streaming mode. It is possible to run command line stuff using NSTask, where parameters aren't interpreted in any way at all. So if {query} was one of the parameters, there would be no need for escaping. However, it is a little harder to use and I'm not sure how to provide a good interface to allow that. But it shouldn't be necessary once proper escaping is implemented.
  4. Alfred provides fairly decent escaping of parameters that works for the majority of use cases (so this isn't terribly high priority). However, Alfred still doesn't account for all possible inputs. For all special characters, see http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html. Since there's so many, I think instead of allowing the user to tick and untick each one, you should provide a few options using radio buttons. Something like "All", "Double quotes" and "None" (and possibly "Custom"). You should also make clear somewhere how "All" should be used, i.e. does {qu
  5. Alfred doesn't have an option to escape backslashes, and double quotes are somewhat funky with backslashes. They work fine with backslash followed by an alphabetical character, but try using e.g. \\ as your query. Then your script will be passed only a single backslash. For 99.9% of scripts, this won't matter, but it still annoys me. You could use single quotes around {query}, which pass the backslashes correctly, but since Alfred doesn't have an option to escape single quotes, then the query can't have any single quotes in it. So I think the best option is double quotes with some things
  6. I hadn't thought of that. It's strange that Alfred doesn't include options to escape single quotes or, for that matter, backslashes. Not sure if it's worth filing a feature request for it. Personally, I think it's nicest and cleanest to not need to use quotes at all, and Alfred should provide you with all the escaping you need. So as far as I can tell, there is no way to currently properly handle all user input (at least not easily). The best compromise I can see is using double quotes, and escaping only backquotes, double quotes and dollar signs. This should handle everything except backs
  7. {query} should NOT have quotes around it, i.e. use python script.py {query} with all the escaping ticked. This works perfectly even when the query contains spaces and quotes. Can you give me any examples where this doesn't work? You would have to do something slightly different if you use inline Python code, but I think that's a bad idea for various other reasons. Ah, thanks for that example. You're right, decoding does seem necessary. I think the keychain functions are definitely useful because it takes a fair amount of effort to read through the docs and figure ou
  8. And IMHO `alp.timestamp(format=None)` should not be part of the library. If anyone needs the current date, they can just call the relevant Python function themselves, or at most create a wrapper for it that returns a string in the format they need.
  9. Hi! I'm just a workflow developer excited by all these cool new libraries. I have some questions about alp: What is `alp.args()` for? Alfred by default escapes everything for you, so you can just use `sys.argv[1]`. Shell escaping is very poorly understood by most people, so perhaps I should explain more clearly: In Alfred, run your python script, for example, by using language `/bin/bash`, and run your script with `python myscript.py {query}`. Note that there are no quotes around `{query}`. Make sure everything is ticked under the Escaping section. Then, in your script, `sys.argv[1]` will
  10. Update: seems you can't use {query} for the Placeholder Title or Placeholder Subtext either. You could argue it's not as useful for the "Please Wait" Subtext, but it should at least be possible to use {query} for the Placeholder Title.
  11. It's just useful for providing better feedback, e.g. for Google Autocomplete you can say "Searching for {query}…" rather than something like just "Searching…". I wasn't sure if it was a bug or a feature request, but I went with bug because currently Alfred replaces {query} with an ellipsis, so it recognizes it, but does not replace it as it should.
  12. I want to show the user's query inside the "Please Wait" Subtext. I tried using {query}, but it shows an ellipsis instead of the actual query. Using the latest v2 (166), Mac OSX 10.8.
  • Create New...