dotfiles

Personal dotfiles
git clone https://git.bracken.jp/dotfiles.git
Log | Files | Refs | LICENSE

commit ddb5a0bd4394919e6f7309ba4d267d8f61dfc6cb
parent a99a371c490057268d07c64991c936880158d550
Author: Chris Bracken <chris@bracken.jp>
Date:   Tue, 28 Mar 2017 17:37:09 -0700

Bugfix: ensure PATH component match in path_remove

Previously, path_remove could incorrectly match and remove a path
substring. Example:

   path_prepend "$HOME/bin/tools"
   path_prepend "$HOME/bin"

would result in "/Users/cbracken/bin:/tools".

Diffstat:
M.paths | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.paths b/.paths @@ -3,7 +3,7 @@ # add to path if not already there path_remove() { - PATH=$(echo $PATH | sed "s:$1::;s/::/:/;s/:$//") + PATH=$(echo $PATH | sed "s:^$1\:::;s:\:$1\::\::;s:\:$1::") } path_prepend() {