From 5b2102cebb7c716aaa6668d089d333448ad1ec4e Mon Sep 17 00:00:00 2001 From: andre Date: Tue, 13 Oct 2009 10:57:42 +0000 Subject: [PATCH] Added support for lesspipe and lesspipe.sh under OSX --- zshrc | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/zshrc b/zshrc index 1074985..d94ccaf 100644 --- a/zshrc +++ b/zshrc @@ -54,12 +54,6 @@ LESS="-c -x4 -R -MM -PMFile\:?f%f:STDIN. ?BSize\:?B%B:Unk.?B\:?pb%pb\%:Unk.?B\:% LESSCHARSET=utf-8 READNULLCMD=/usr/bin/less PAGER=/usr/bin/less -if [ -x =lesspipe ]; then - eval `lesspipe` -fi -if [ -x =lesspipe.sh ]; then - eval `lesspipe.sh` -fi EDITOR=vi @@ -158,12 +152,12 @@ fi if [ `uname -s` = "Darwin" ]; then export LSCOLORS="GxgxcxdxCxegedabagacad" # Alias for editors on OSX - alias mvim = 'mvim --remote-tab-silent' - alias vim = mvim - alias aquamacs = 'open -a Aquamacs\ Emacs' - alias ldd = 'otool -L' - alias ls = 'ls -F -G' - alias skill = killall + alias mvim='mvim --remote-tab-silent' + alias vim=mvim + alias aquamacs='open -a Aquamacs\ Emacs' + alias ldd='otool -L' + alias ls='ls -F -G' + alias skill=killall alias lsrebuild='/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user' if [ -f /opt/local/etc/init.sh ]; then @@ -171,6 +165,15 @@ if [ `uname -s` = "Darwin" ]; then fi fi +LESSPIPE=`which lesspipe` +if [ $? -eq 0 ]; then + eval `$LESSPIPE` +fi +LESSPIPE=`which lesspipe.sh` +if [ $? -eq 0 ]; then + eval `$LESSPIPE` +fi + # Process Local file for localDir in /etc/zsh /etc /usr/local/etc /usr/local/etc/zsh; do if [ -f ${localDir}/zshrc.local ]; then