From: Michael Prokop Date: Sun, 9 Dec 2007 21:58:37 +0000 (+0100) Subject: extend debbug() based on http://xana.scru.org/quanks/b-func.html X-Git-Tag: 0.3.41~1 X-Git-Url: https://git.grml.org/?p=grml-etc-core.git;a=commitdiff_plain;h=4407c3ab549edaa76d5c6b49b335e513f6ca92b9 extend debbug() based on xana.scru.org/quanks/b-func.html --- diff --git a/debian/changelog b/debian/changelog index a7850ad..ab8a11a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,7 @@ grml-etc-core (0.3.41) unstable; urgency=low [ Michael Prokop ] * add alias 'g' for git * set modelines for vim according to new indenting policy + * extend debbug() based on http://xana.scru.org/quanks/b-func.html [ Frank Terbeck ] * several small cleanups by ft diff --git a/etc/skel/.zshrc b/etc/skel/.zshrc index d2d5f79..49f77e0 100644 --- a/etc/skel/.zshrc +++ b/etc/skel/.zshrc @@ -3,7 +3,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Don Dez 06 23:27:51 CET 2007 [mika] +# Latest change: Son Dez 09 22:58:07 CET 2007 [mika] ################################################################################ # source ~/.zshrc.global {{{ @@ -15,9 +15,9 @@ # Note, that xsource() is defined in the global file, so here, # we will have to do the sourcing manually for once: - [[ -z "$ZSHRC_GLOBAL_HAS_BEEN_READ" ]] \ - && [[ -r "${HOME}/.zshrc.global" ]] \ - && source "${HOME}/.zshrc.global" +[[ -z "$ZSHRC_GLOBAL_HAS_BEEN_READ" ]] \ +&& [[ -r "${HOME}/.zshrc.global" ]] \ +&& source "${HOME}/.zshrc.global" # }}} # check whether global file has been read {{{ @@ -257,7 +257,24 @@ fi #f4# Search for newspostings from authors agoogle() { ${=BROWSER} "http://groups.google.com/groups?as_uauthors=$*" ; } #f4# Search Debian Bug Tracking System by BugID in mbox format -debbug() { ${=BROWSER} "http://bugs.debian.org/$*" } +debbug() { + setopt localoptions extendedglob + if [[ $# -eq 1 ]]; then + case "$1" in + ([0-9]##) + ${=BROWSER} "http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=$1" + ;; + (*@*) + ${=BROWSER} "http://bugs.debian.org/cgi-bin/pkgreport.cgi?submitter=$1" + ;; + (*) + ${=BROWSER} "http://bugs.debian.org/$*" + ;; + esac + else + print "$0 needs one argument" + fi +} #f4# Search Debian Bug Tracking System debbugm() { bts show --mbox $1 } # provide bugnummer as "$1" #f4# Search DMOZ