From 76611f20ca2f17284b3032637fcc01916c082668 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexander=20=27z3ttacht=27=20Steinb=C3=83=C2=B6ck?= Date: Sun, 27 Jan 2008 12:39:40 +0100 Subject: [PATCH] etc/zsh/zshrc: changed `most' for $PAGER in dchange(), uchange(), dnews. Furthermore `export PAGER' was moved from etc/skel/.zshrc to etc/zsh/zshrc, since the afore-mentioned functions reside in that file as well. --- etc/skel/.zshrc | 2 -- etc/zsh/zshrc | 15 +++++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/etc/skel/.zshrc b/etc/skel/.zshrc index 57bbbb9..d8fb9f7 100644 --- a/etc/skel/.zshrc +++ b/etc/skel/.zshrc @@ -60,8 +60,6 @@ if [[ -z "$BROWSER" ]] ; then check_com -c w3m && export BROWSER=w3m fi fi -#v# -(( ${+PAGER} )) || export PAGER="less" #m# v QTDIR \kbd{/usr/share/qt[34]}\quad [for non-root only] [[ -d /usr/share/qt3 ]] && export QTDIR=/usr/share/qt3 diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index ab04101..fc1eedd 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -315,6 +315,9 @@ else fi #v# +(( ${+PAGER} )) || export PAGER="less" + +#v# export MAIL=${MAIL:-/var/mail/$USER} # if we don't set $SHELL then aterm, rxvt,.. will use /bin/sh or /bin/bash :-/ @@ -1650,13 +1653,13 @@ else # manzsh() { man zshall | $MYLESS -p $1 ; } fi -if check_com -c most ; then +if check_com -c $PAGER ; then #f1# View Debian's changelog of a given package dchange() { if [[ -r /usr/share/doc/${1}/changelog.Debian.gz ]] ; then - most /usr/share/doc/${1}/changelog.Debian.gz + $PAGER /usr/share/doc/${1}/changelog.Debian.gz elif [[ -r /usr/share/doc/${1}/changelog.gz ]] ; then - most /usr/share/doc/${1}/changelog.gz + $PAGER /usr/share/doc/${1}/changelog.gz else if check_com -c aptitude ; then echo "No changelog for package $1 found, using aptitude to retrieve it." @@ -1677,10 +1680,10 @@ if check_com -c most ; then #f1# View Debian's NEWS of a given package dnews() { if [[ -r /usr/share/doc/${1}/NEWS.Debian.gz ]] ; then - most /usr/share/doc/${1}/NEWS.Debian.gz + $PAGER /usr/share/doc/${1}/NEWS.Debian.gz else if [[ -r /usr/share/doc/${1}/NEWS.gz ]] ; then - most /usr/share/doc/${1}/NEWS.gz + $PAGER /usr/share/doc/${1}/NEWS.gz else echo "No NEWS file for package $1 found, sorry." return 1 @@ -1693,7 +1696,7 @@ if check_com -c most ; then #f1# View upstream's changelog of a given package uchange() { if [[ -r /usr/share/doc/${1}/changelog.gz ]] ; then - most /usr/share/doc/${1}/changelog.gz + $PAGER /usr/share/doc/${1}/changelog.gz else echo "No changelog for package $1 found, sorry." return 1 -- 2.1.4