Browse Source

[Fix #383] Do not set $MANPATH

man dynamically searches for man pages based on $PATH.
master
Sorin Ionescu 12 years ago
parent
commit
e5de305157
  1. 4
      modules/haskell/init.zsh
  2. 6
      modules/macports/init.zsh
  3. 2
      modules/perl/init.zsh
  4. 4
      modules/python/init.zsh
  5. 13
      runcoms/zshenv

4
modules/haskell/init.zsh

@ -10,11 +10,9 @@ if (( ! $+commands[ghc] )); then
return 1 return 1
fi fi
# Prepend Cabal per user directories to PATH/MANPATH. # Prepend Cabal per user directories to PATH.
if [[ "$OSTYPE" == darwin* && -d $HOME/Library/Haskell ]]; then if [[ "$OSTYPE" == darwin* && -d $HOME/Library/Haskell ]]; then
path=($HOME/Library/Haskell/bin(/N) $path) path=($HOME/Library/Haskell/bin(/N) $path)
manpath=($HOME/Library/Haskell/man(/N) $manpath)
else else
path=($HOME/.cabal/bin(/N) $path) path=($HOME/.cabal/bin(/N) $path)
manpath=($HOME/.cabal/man(/N) $manpath)
fi fi

6
modules/macports/init.zsh

@ -21,12 +21,6 @@ infopath=(
$infopath $infopath
) )
# Set the list of directories that man searches for manuals.
manpath=(
/opt/local/share/man
$manpath
)
# Set the list of directories that Zsh searches for programs. # Set the list of directories that Zsh searches for programs.
path=( path=(
/opt/local/{bin,sbin} /opt/local/{bin,sbin}

2
modules/perl/init.zsh

@ -20,8 +20,6 @@ if [[ "$OSTYPE" == darwin* ]]; then
perl_path="$HOME/Library/Perl/5.12" perl_path="$HOME/Library/Perl/5.12"
if [[ -f "$perl_path/lib/perl5/local/lib.pm" ]]; then if [[ -f "$perl_path/lib/perl5/local/lib.pm" ]]; then
manpath=("$perl_path/man" $manpath)
if [[ ! -s "$cache_file" ]]; then if [[ ! -s "$cache_file" ]]; then
perl -I$perl_path/lib/perl5 -Mlocal::lib=$perl_path >! "$cache_file" perl -I$perl_path/lib/perl5 -Mlocal::lib=$perl_path >! "$cache_file"
fi fi

4
modules/python/init.zsh

@ -17,14 +17,12 @@ if (( ! $+commands[python] && ! $+commands[pythonz] )); then
fi fi
# Prepend PEP 370 per user site packages directory, which defaults to # Prepend PEP 370 per user site packages directory, which defaults to
# ~/Library/Python on Mac OS X and ~/.local elsewhere, to PATH/MANPATH. # ~/Library/Python on Mac OS X and ~/.local elsewhere, to PATH.
if [[ "$OSTYPE" == darwin* ]]; then if [[ "$OSTYPE" == darwin* ]]; then
path=($HOME/Library/Python/*/bin(N) $path) path=($HOME/Library/Python/*/bin(N) $path)
manpath=($HOME/Library/Python/*/{,share/}man(N) $manpath)
else else
# This is subject to change. # This is subject to change.
path=($HOME/.local/bin $path) path=($HOME/.local/bin $path)
manpath=($HOME/.local/{,share/}man(N) $manpath)
fi fi
# Load virtualenvwrapper into the shell session. # Load virtualenvwrapper into the shell session.

13
runcoms/zshenv

@ -34,7 +34,6 @@ fi
# #
typeset -gU cdpath fpath mailpath path typeset -gU cdpath fpath mailpath path
typeset -gxU MANPATH
typeset -gxUT INFOPATH infopath typeset -gxUT INFOPATH infopath
# Set the the list of directories that cd searches. # Set the the list of directories that cd searches.
@ -49,18 +48,6 @@ infopath=(
$infopath $infopath
) )
# Set the list of directories that man searches for manuals.
manpath=(
/usr/local/share/man
/usr/share/man
$manpath
)
for path_file in /etc/manpaths.d/*(.N); do
manpath+=($(<$path_file))
done
unset path_file
# Set the list of directories that Zsh searches for programs. # Set the list of directories that Zsh searches for programs.
path=( path=(
/usr/local/{bin,sbin} /usr/local/{bin,sbin}

Loading…
Cancel
Save