1 ### vim:ft=zsh:foldmethod=marker
2 ## freshmeat.net search backend for lookup
3 ## Copyright: 2009, Frank Terbeck <ft@bewatermyfriend.org>
5 LOOKUP_guard || return 1
6 [[ -n ${lookup_describe} ]] &&
7 printf '%s' 'search freshmeat.net' &&
12 LOOKUP_guard -fd LOOKUP_help_${backend} ||
13 function LOOKUP_help_${backend}() {
14 LOOKUP_guard || return 1
15 printf 'usage: %s <query>\n' ${backend}
16 printf '\n Query freshmeat.net for software projects.\n'
17 printf '\nExamples:\n'
18 printf ' %% lookup %s zsh\n' ${backend}
19 printf ' %% lookup %s gnu screen\n\n' ${backend}
21 LOOKUP_help && return 0
23 if [[ -n ${lookup_complete} ]] ; then
24 _message 'freshmeat search string'
31 LOOKUP_query_handler || return 1
32 if [[ -z ${QUERY} ]] ; then
38 LOOKUP_browser "http://freshmeat.net/search/?q=${QUERY}§ion=projects"