projects
/
grml-etc-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
zshrc: fix breakage, which was revealed by a zsh v3.1.7 testrun
[grml-etc-core.git]
/
etc
/
zsh
/
zshrc
diff --git
a/etc/zsh/zshrc
b/etc/zsh/zshrc
index
2503d0e
..
671e7c1
100644
(file)
--- a/
etc/zsh/zshrc
+++ b/
etc/zsh/zshrc
@@
-315,6
+315,9
@@
else
fi
#v#
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 :-/
export MAIL=${MAIL:-/var/mail/$USER}
# if we don't set $SHELL then aterm, rxvt,.. will use /bin/sh or /bin/bash :-/
@@
-335,7
+338,7
@@
check_com -c dircolors && eval $(dircolors -b)
if [[ -n "$BROKEN_COMPLETION_DIR" ]] ; then
print 'Warning: not setting completion directories because broken files have been found.' >&2
else
if [[ -n "$BROKEN_COMPLETION_DIR" ]] ; then
print 'Warning: not setting completion directories because broken files have been found.' >&2
else
- [[ -d /etc/zsh/completion.d ]] && fpath
+=(
/etc/zsh/completion.d )
+ [[ -d /etc/zsh/completion.d ]] && fpath
=( $fpath
/etc/zsh/completion.d )
if [[ -d /etc/zsh/functions.d ]] ; then
fpath+=( /etc/zsh/functions.d )
for func in /etc/zsh/functions.d/[^_]*[^~] ; do
if [[ -d /etc/zsh/functions.d ]] ; then
fpath+=( /etc/zsh/functions.d )
for func in /etc/zsh/functions.d/[^_]*[^~] ; do
@@
-871,7
+874,7
@@
if [[ -f ~/.zdirs ]] && [[ ${#dirstack[*]} -eq 0 ]] ; then
fi
chpwd() {
fi
chpwd() {
- builtin print ${(u)dirstack} >! ~/.zdirs
+ builtin print
-l
${(u)dirstack} >! ~/.zdirs
}
# }}}
}
# }}}
@@
-1356,7
+1359,7
@@
fi
# {{{ Use hard limits, except for a smaller stack and no core dumps
unlimit
# {{{ Use hard limits, except for a smaller stack and no core dumps
unlimit
-limit stack 8192
+
is4 &&
limit stack 8192
isgrmlcd && limit core 0 # important for a live-cd-system
limit -s
# }}}
isgrmlcd && limit core 0 # important for a live-cd-system
limit -s
# }}}
@@
-1650,13
+1653,13
@@
else
# manzsh() { man zshall | $MYLESS -p $1 ; }
fi
# 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
#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
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."
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
#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
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
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
#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
else
echo "No changelog for package $1 found, sorry."
return 1