X-Git-Url: http://git.grml.org/?a=blobdiff_plain;ds=sidebyside;f=usr_share_grml%2Fzsh%2Ffunctions%2FLookup%2FBackends%2FLOOKUP_be_gmane;h=74f8c9740abf927216ee2c6522efd8c117e40236;hb=2f64ae016b211b59ddd38b1ad2026b2ff9336328;hp=bda727dd236fb690390e9ce4dd977fe7bc9ee197;hpb=1ee27bd79f2b8eae519f6890bc43f5feca13a261;p=grml-etc-core.git diff --git a/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_gmane b/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_gmane index bda727d..74f8c97 100644 --- a/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_gmane +++ b/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_gmane @@ -31,6 +31,8 @@ function LOOKUP_help_${backend}() { # gmane backend help {{{ LOOKUP_guard || return 1 printf 'usage: %s \n' ${backend} + printf ' -G Open group (like gmane.emacs.orgmode) in gmane'\''s browser mode\n' + printf ' Completion will offer bookmarked groups.\n' printf ' -l search for original list names (like zsh-workers)\n' printf ' -s match gmane group names (like comp.shell)\n' printf ' -L list-mode; do not open a browser, just print the results\n' @@ -61,7 +63,7 @@ function LOOKUP_help_${backend}() { printf ' gname.group.name:description\n' printf ' The '\'':description'\'' part is optional.\n' printf ' That way you can search for group names (using -L, -l and -s) and put\n' - printf ' your prefered groups into that file. That way you get rid of a lot of\n' + printf ' your preferred groups into that file. That way you get rid of a lot of\n' printf ' typing by using completion: %% lu gmane -g \n' printf '\nExamples:\n' printf ' %% zstyle '\'':lookup:*:%s:*'\'' list-default true\n' ${backend} @@ -73,6 +75,7 @@ function LOOKUP_help_${backend}() { printf ' %% lookup %s -g gmane.comp.shells.fish.user zsh\n' ${backend} printf ' %% lookup %s -L -l zsh-workers\n' ${backend} printf ' %% lookup %s -L -s openbsd\n' ${backend} + printf ' %% lookup %s -G gmane.emacs.orgmode\n' ${backend} #}}} } LOOKUP_help && return 0 @@ -116,6 +119,7 @@ if [[ -n ${lookup_complete} ]] ; then } comp_args=( + '-G[browse gmane group]:group name:__lookup_'${backend}'_group_bookmarks' '-l[search for original list names]:list name:' '-s[match gmane group names]:group name:' '-L[switch to list-mode]' @@ -143,6 +147,7 @@ zstyle -s "${lookup_context}" default-oper operation || operation='and' # parse options lu_parseopts_args=( + G bool l bool m bool s bool @@ -245,7 +250,10 @@ function LOOKUP_beh_${backend}_list() { # make the actual queries LOOKUP_encode -q -if [[ ${opts[-l]} == 'yes' ]] ; then +if [[ ${opts[-G]} == 'yes' ]] ; then + LOOKUP_browser "http://news.gmane.org/${QUERY}" + ret="$?" +elif [[ ${opts[-l]} == 'yes' ]] ; then if [[ ${list_mode} == 'yes' ]] ; then LOOKUP_beh_${backend}_list 'list' ${QUERY} ret="$?"