Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Sub-folders in $PATH?



# victor3xray@xxxxxxxxx / 2016-07-03 01:26:06 +0200:
> export
> PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:
> [[ -d ~/bin ]] && export PATH=${PATH}:$(find ~/bin -type d | tr '\n' ':' |
> sed 's/:$//') #include all ~/bin/subdirs

you could replace both exports with

path+=(
  {/usr/local,/usr,}/bin
  {/usr/local,/usr,}/sbin
  ~/bin/*(/N)
)

-- 
roman



Messages sorted by: Reverse Date, Date, Thread, Author