mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-08 04:34:00 +02:00
Merge c641f7793c into 291e96dcd0
This commit is contained in:
commit
57303a099a
1 changed files with 27 additions and 0 deletions
27
plugins/pathrc/pathrc.plugin.zsh
Normal file
27
plugins/pathrc/pathrc.plugin.zsh
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# If there is no PATHRC already set, default to ~/.pathrc
|
||||
if [ -z "$PATHRC" ]; then
|
||||
PATHRC=$HOME/.pathrc
|
||||
fi
|
||||
|
||||
# Similarly, MANPATHRC defaults to ~/.manpath
|
||||
if [ -z "$MANPATHRC" ]; then
|
||||
MANPATHRC=$HOME/.manpathrc
|
||||
fi
|
||||
|
||||
# Set the PATH
|
||||
if [ -f $PATHRC ]; then
|
||||
path=()
|
||||
typeset -U path
|
||||
for dir in $(<$PATHRC); do
|
||||
path+=($dir)
|
||||
done
|
||||
fi
|
||||
|
||||
# Set the MANPATH
|
||||
if [ -f $MANPATHRC ]; then
|
||||
manpath=()
|
||||
typeset -U manpath
|
||||
for dir in $(<$MANPATHRC); do
|
||||
manpath+=($dir)
|
||||
done
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue