stty sane erase ^H
+ if [ -n "`which less 2>/dev/null`" ]; then
+ HAS_LESS=true
+ fi
+
case "$TERM" in
linux)
# mutt, python and vim
BACKGROUND=DARK
export BACKGROUND
- . "$HOME"/lib/config/less/dark_bg
+ [ -n "$HAS_LESS" ] && . "$HOME"/lib/config/less/dark_bg
;;
*rxvt*|screen*|*term*|vt100)
BACKGROUND=LIGHT
export BACKGROUND
- . "$HOME"/lib/config/less/light_bg
+ [ -n "$HAS_LESS" ] && . "$HOME"/lib/config/less/light_bg
;;
esac
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
fi
- PAGER=less
- LESS="FRXgimq"
- case "$LC_CTYPE" in
- *UTF-8) LESSCHARSET=utf-8
- ;;
+ if [ -n "$HAS_LESS" ]; then
+ PAGER=less
+ LESS="FRXgimq"
+ case "$LC_CTYPE" in
+ *UTF-8) LESSCHARSET=utf-8
+ ;;
- *) LESSCHARSET=koi8-r
- ;;
- esac
- #LESSCHARDEF=32c.
- LESSEDIT='vim ?lt+%lt. -- %f'
- export PAGER LESS LESSCHARSET LESSEDIT # LESSCHARDEF
+ *) LESSCHARSET=koi8-r
+ ;;
+ esac
+ #LESSCHARDEF=32c.
+ LESSEDIT='vim ?lt+%lt. -- %f'
+ export LESS LESSCHARSET LESSEDIT # LESSCHARDEF
+
+ else
+ PAGER=more
+ fi
+ export PAGER
EDITOR="$HOME"/.vim/vim.sh
VISUAL="$EDITOR"
# mutt, python and vim
BACKGROUND=LIGHT
export BACKGROUND
- . "$HOME"/lib/config/less/light_bg
+ [ -n "$HAS_LESS" ] && . "$HOME"/lib/config/less/light_bg
# BROWSERs
BROWSER="firefox:seamonkey:chromium:google-chrome:opera:xlinks2:$BROWSER"
#export __GL_FSAA_MODE
fi
+[ -n "$HAS_LESS" ] && unset HAS_LESS
+
#
# read in usepkg function
# . "$HOME"/lib/config/usepkg.sh