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

Re: Sub-folders in $PATH?



# d.s@xxxxxxxxxxxxxxxxxx / 2016-07-05 04:57:53 +0000:
> Johan DS wrote on Sun, Jul 03, 2016 at 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
> 
> Another way of doing the same thing:
> 
>     path+=(
>       /usr/local/bin /usr/bin /bin /usr/local/sbin /usr/sbin /sbin 
>       ~/bin/**/*(/N)
>     )
> 
> (unlike Roman's solution this uses ** to be equivalent to the find(1))

yeah, sorry about that, i *meant* to use recursive glob.

-- 
roman



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