[zsh] Add append-to-path function to env
This commit is contained in:
parent
29cacbea11
commit
79d53de0a7
1 changed files with 8 additions and 0 deletions
8
env
8
env
|
@ -32,6 +32,14 @@ function prepend-to-path
|
|||
fi
|
||||
}
|
||||
|
||||
function append-to-path
|
||||
{
|
||||
if [[ -d "$1" ]]; then
|
||||
path+="$1"
|
||||
export path
|
||||
fi
|
||||
}
|
||||
|
||||
path=("/usr/local/bin" "/usr/bin" "/bin" "/usr/local/sbin" "/usr/sbin" "/sbin")
|
||||
prepend-to-path "/usr/X11/bin"
|
||||
prepend-to-path "/opt/local/bin"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue