Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Sub-folders in $PATH?
- X-seq: zsh-users 21731
- From: Roman Neuhauser <neuhauser@xxxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Subject: Re: Sub-folders in $PATH?
- Date: Tue, 5 Jul 2016 11:14:46 +0200
- Cc: Johan DS <victor3xray@xxxxxxxxx>, TJ Luoma <luomat@xxxxxxxxx>, Zsh-Users List <zsh-users@xxxxxxx>
- In-reply-to: <20160705045753.GA8004@tarsus.local2>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CADjGqHtZ61wcSaL_SEKT7Kw=6DpByp9=mdz1eZbYyvgA8QCAZQ@mail.gmail.com> <CAEyXbzcge3DWff-uFy4+ZL3Nbbbqs+FyYcBOMVkBLugv7--jzg__46346.1699583151$1467502045$gmane$org@mail.gmail.com> <20160705045753.GA8004@tarsus.local2>
# 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