From: Michael Prokop Date: Tue, 12 Jun 2007 12:01:16 +0000 (+0200) Subject: /etc/zsh/zshrc: added function dnews X-Git-Tag: 0.3.12~12 X-Git-Url: https://git.grml.org/?a=commitdiff_plain;ds=sidebyside;h=215e3f544c360d8bd1651b706fd6088bc1597d3f;p=grml-etc-core.git /etc/zsh/zshrc: added function dnews --- diff --git a/debian/changelog b/debian/changelog index 76c4f42..5e2d51d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +grml-etc-core (0.3.13) unstable; urgency=low + + * /etc/zsh/zshrc: added function dnews (to view Debian's NEWS file of the + package). + + -- Michael Prokop Tue, 12 Jun 2007 14:00:55 +0200 + grml-etc-core (0.3.12) unstable; urgency=low * Added some more examples to /etc/network/interfaces.examples. diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index b609ce2..92a9634 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/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: Sam Jun 09 18:44:38 CEST 2007 [mika] +# Latest change: Die Jun 12 14:00:47 CEST 2007 [mika] ################################################################################ # This file is sourced only for interactive shells. It # should contain commands to set up aliases, functions, @@ -1105,6 +1105,22 @@ If you want to use xinit anyway please call \"/usr/bin/xinit\"." _dchange() { _files -W /usr/share/doc -/ } compdef _dchange dchange + # use "dnews " to view Debian's NEWS file of the package: + dnews() { + if [ -r /usr/share/doc/${1}/NEWS.Debian.gz ] ; then + most /usr/share/doc/${1}/NEWS.Debian.gz + else + if [ -r /usr/share/doc/${1}/NEWS.gz ] ; then + most /usr/share/doc/${1}/NEWS.gz + else + echo "No NEWS file for package $1 found, sorry." + return 1 + fi + fi + } + _dnews() { _files -W /usr/share/doc -/ } + compdef _dnews dnews + # use "uchange " to view upstream's changelog of the package: uchange() { if [ -r /usr/share/doc/${1}/changelog.gz ] ; then