From: Frank Terbeck Date: Sat, 2 Feb 2008 09:41:09 +0000 (+0100) Subject: zshrc: using FOO=${FOO:-default} instead of (( ${+FOO} )) || FOO=default X-Git-Tag: 0.3.48^2~1 X-Git-Url: http://git.grml.org/?p=grml-etc-core.git;a=commitdiff_plain;h=59af3d44e7f5d2b3b86451ac0e17103832c34f14 zshrc: using FOO=${FOO:-default} instead of (( ${+FOO} )) || FOO=default This is more correct, IMHO. The old way only sets the default if $FOO is unset; whereas the new way sets the default if $FOO is unset *or* empty (which is certainly desirable, if you think of variables like $PAGER). --- diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 42de4c4..c752a63 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -369,7 +369,7 @@ else fi #v# -(( ${+PAGER} )) || export PAGER="less" +export PAGER=${PAGER:-less} #v# export MAIL=${MAIL:-/var/mail/$USER} @@ -381,7 +381,7 @@ export SHELL='/bin/zsh' check_com -c dircolors && eval $(dircolors -b) # set width of man pages to 80 for more convenient reading -# (( ${+MANWIDTH} )) || export MANWIDTH=80 +# export MANWIDTH=${MANWIDTH:-80} # Search path for the cd command # cdpath=(.. ~)