X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fskel%2F.zshrc;h=e722f764926159d4a596d2e21ff0fe07e32846b3;hb=2eb50e905d4c556ac347c56bd804b7ae114551b5;hp=8196337a053e7af815f074624caafadf2ad455d2;hpb=3d6452fdfc44310b5615eaf61c95cab4c27d9bf8;p=grml-etc-core.git diff --git a/etc/skel/.zshrc b/etc/skel/.zshrc index 8196337..e722f76 100644 --- a/etc/skel/.zshrc +++ b/etc/skel/.zshrc @@ -3,19 +3,27 @@ # 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: Mit Aug 08 21:22:03 CEST 2007 [mika] +# Latest change: Son Dez 09 22:58:07 CET 2007 [mika] ################################################################################ # source ~/.zshrc.global {{{ + # see /etc/zsh/zshrc for some general settings # If you don't have write permissions to /etc/zsh/zshrc on your own # copy the file to your $HOME as /.zshrc.global and we source it: -xsource "${HOME}/.zshrc.global" + +# 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" # }}} # check whether global file has been read {{{ if [[ -z "$ZSHRC_GLOBAL_HAS_BEEN_READ" ]] ; then - print 'Warning: global zsh config has not been read'>&2 + print 'Warning: global zsh config has not been read.' >&2 + print ' prepare for possible errors!' >&2 fi # }}} @@ -249,7 +257,25 @@ 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" + return 1 + fi +} #f4# Search Debian Bug Tracking System debbugm() { bts show --mbox $1 } # provide bugnummer as "$1" #f4# Search DMOZ @@ -1253,4 +1279,4 @@ xunfunction ### doc strings for external functions from files #m# f5 grml-wallpaper() Sets a wallpaper (try completion for possible values) ## END OF FILE ################################################################# -# vim:foldmethod=marker +# vim:foldmethod=marker autoindent expandtab shiftwidth=4