Make list of paths more readable
Having each path on a separate line makes it easier to read them at a glance.
This commit is contained in:
parent
b3c8d0e267
commit
756e14df81
1 changed files with 15 additions and 8 deletions
23
bash/.bashrc
23
bash/.bashrc
|
@ -49,12 +49,15 @@ bashrc_customize_paths() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add custom bin dirs to PATH if they exist and are not already in PATH.
|
# Add custom bin dirs to PATH if they exist and are not already in PATH.
|
||||||
for p in $prefix/opt/coreutils/libexec/gnubin $HOME/.local/bin $HOME/bin
|
while read p
|
||||||
do
|
do
|
||||||
if [ -d "$p" ] && [[ ":$PATH:" != *":$p:"* ]]; then
|
if [ -d "$p" ] && [[ ":$MANPATH:" != *":$p:"* ]]; then
|
||||||
PATH="$p:$PATH"
|
MANPATH="$p:$MANPATH"
|
||||||
fi
|
fi
|
||||||
done
|
done <<-EOF
|
||||||
|
$prefix/share/man
|
||||||
|
$prefix/opt/coreutils/libexec/gnuman
|
||||||
|
EOF
|
||||||
|
|
||||||
# If MANPATH is not yet defined, initialize it with the contents of
|
# If MANPATH is not yet defined, initialize it with the contents of
|
||||||
# `manpath`.
|
# `manpath`.
|
||||||
|
@ -65,12 +68,16 @@ bashrc_customize_paths() {
|
||||||
# Prepend custom man directories to MANPATH if they exist, so that we get
|
# Prepend custom man directories to MANPATH if they exist, so that we get
|
||||||
# correct man page entries when multiple versions of a command are
|
# correct man page entries when multiple versions of a command are
|
||||||
# available.
|
# available.
|
||||||
for p in $prefix/share/man $prefix/opt/coreutils/libexec/gnuman
|
while read p
|
||||||
do
|
do
|
||||||
if [ -d "$p" ] && [[ ":$MANPATH:" != *":$p:"* ]]; then
|
if [ -d "$p" ] && [[ ":$PATH:" != *":$p:"* ]]; then
|
||||||
MANPATH="$p:$MANPATH"
|
PATH="$p:$PATH"
|
||||||
fi
|
fi
|
||||||
done
|
done <<-EOF
|
||||||
|
$prefix/opt/coreutils/libexec/gnubin
|
||||||
|
$HOME/.local/bin
|
||||||
|
$HOME/bin
|
||||||
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
bashrc_customize_aliases() {
|
bashrc_customize_aliases() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue