Skip to content

Commit

Permalink
fixed a quoting issue in my_pathmatch() that caused some escaping pro…
Browse files Browse the repository at this point in the history
…blems resulting in duplicate path elements
  • Loading branch information
G. Clifford Williams committed Nov 14, 2012
1 parent 0b8f930 commit df11960
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions dot_shrc
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ my_pathmatch(){
mPMatchDel=${3:-":"} #optional delimiter (use ';' for LUA*)

case ${mPMatchVar} in
"${mPMatchString}"|\
"${mPMatchString}${mPMatchDel}*"|\
"*${mPMatchDel}${mPMatchString}${mPMatchDel}*"|\
"*${mPMatchDel}${mPMatchString}")
${mPMatchString}|\
${mPMatchString}${mPMatchDel}*|\
*${mPMatchDel}${mPMatchString}${mPMatchDel}*|\
*${mPMatchDel}${mPMatchString})
echo "rejecting (${mPMatchString}) because it's in there already"
{ my_pathmatch_cleanup; return 0 ;}
;;
Expand Down Expand Up @@ -103,6 +103,8 @@ my_pathadd(){
#PATH parameter passed ($2)
eval "$my_PATHVAR=\"$PATH_add\""
fi
else
echo "${PATH_add} is not a directory that I can find"
fi
shift
done
Expand Down Expand Up @@ -240,6 +242,7 @@ case ${my_OS:-unset} in
unset try_path
done
if [ -n "${ti_path}" ] ; then
alias titanium="echo 'not yet poppin'"
unset ti_version
unalias titanium
ti_left="${ti_path%% *}"
Expand Down

0 comments on commit df11960

Please sign in to comment.