setting up path in zsh 1

setting up path in zsh

# append
path+=('/home/kevin/pear/bin')
# or prepend
path=('/home/kevin/pear/bin' $path)
# export to sub-processes (make it inherited by child processes)
export PATH

Here is what the above code is Doing:
1. Create an array named path
2. Add the current value of PATH to the array
3. Append the new path to the array
4. Prepend the new path to the array
5. Export the new path to sub-processes

Similar Posts