Similar to what dchange provides for changelogs, provide the
same feature for copyright files (works at least on Debian
systems).
Thanks: Gregor Herrmann <gregoa@debian.org> for the patch
: **dchange()**
Shows the changelog of given package in $PAGER.
: **dchange()**
Shows the changelog of given package in $PAGER.
+: **dcopyright()**
+Shows the copyright of given package in $PAGER.
+
: **debian2hd()**
Tells the user to use grml-debootstrap, if she wants to install debian to
harddisk.
: **debian2hd()**
Tells the user to use grml-debootstrap, if she wants to install debian to
harddisk.
_dnews() { _files -W /usr/share/doc -/ }
compdef _dnews dnews
_dnews() { _files -W /usr/share/doc -/ }
compdef _dnews dnews
+ #f1# View Debian's copyright of a given package
+ dcopyright() {
+ emulate -L zsh
+ if [[ -r /usr/share/doc/$1/copyright ]] ; then
+ $PAGER /usr/share/doc/$1/copyright
+ else
+ echo "No copyright file for package $1 found, sorry."
+ return 1
+ fi
+ }
+ _dcopyright() { _files -W /usr/share/doc -/ }
+ compdef _dcopyright dcopyright
+
#f1# View upstream's changelog of a given package
uchange() {
emulate -L zsh
#f1# View upstream's changelog of a given package
uchange() {
emulate -L zsh