Modification to previous profile.d script changes

This commit is contained in:
Viktor Jancik 2015-08-22 00:45:30 +02:00
parent 3f003aa67c
commit b539f87ad6
3 changed files with 8 additions and 18 deletions

View File

@ -1,8 +1,9 @@
#!/bin/csh
# less initialization script (csh) # less initialization script (csh)
if ( -x /usr/bin/lesspipe.sh ) then if ( -x /usr/bin/lesspipe.sh ) then
if ( $?LESSOPEN && { eval 'test ! -z $LESSOPEN' }) then if ( $?LESSOPEN && { eval 'test ! -z $LESSOPEN' } ) then
setenv LESSOPEN "$LESSOPEN | /usr/bin/lesspipe.sh %s" :
else else
setenv LESSOPEN "/usr/bin/lesspipe.sh %s" setenv LESSOPEN "|/usr/bin/lesspipe.sh %s"
endif endif
endif endif

View File

@ -1,9 +1,4 @@
#!/bin/sh
# less initialization script (sh) # less initialization script (sh)
if [ -x /usr/bin/lesspipe.sh ]; then if [ -x /usr/bin/lesspipe.sh ] && [ -z $LESSOPEN ]; then
if [ -z "$LESSOPEN" ]; then export LESSOPEN="|/usr/bin/lesspipe.sh %s"
export LESSOPEN="/usr/bin/lesspipe.sh %s"
else
export LESSOPEN="$LESSOPEN | /usr/bin/lesspipe.sh %s"
fi
fi fi

View File

@ -1,11 +1,5 @@
#!/bin/zsh #!/bin/zsh
# less initialization script (sh) # less initialization script (sh)
if [[ -x /usr/bin/lesspipe.sh ]] ; then if [[ -x /usr/bin/lesspipe.sh && -z "$LESSOPEN" ]] ; then
if [[ -z "$LESSOPEN" ]] ; then export LESSOPEN="|/usr/bin/lesspipe.sh %s"
export LESSOPEN="/usr/bin/lesspipe.sh %s"
else
export LESSOPEN="$LESSOPEN | /usr/bin/lesspipe.sh %s"
fi
fi fi
echo $LESSOPEN