Tricks for .profile

cfedde on 2009-07-08T02:30:22

# Add manual directories to to your MANPATH environment MANPATH=$MANPATH:`perl -le 'print join ":",grep{s/bin$/man/&&-d} split /:/,$ENV{PATH}'`

# # uniqify PATH and MANPATH # PATH=`perl -le 'print join(":", grep {! $t{$_}++} split(/:/,$ENV{PATH}))'` MANPATH=`perl -le 'print join(":", grep {! $t{$_}++} split(/:/,$ENV{MANPATH}))'`


I like zsh

Dom2 on 2009-07-09T18:53:19

Uniqifying your path becomes:

  typeset -U PATH