diff --git a/.profile b/.profile index b8a6fd90..9d04f876 100755 --- a/.profile +++ b/.profile @@ -43,8 +43,8 @@ for path in $desiredpath; do done unset IFS # We remove any prepending colons to make it appear neater -while [ "${PATH:0:1}" == ":" ]; do - PATH="${PATH:1}" +while [ "${PATH#:}" != "$PATH" ]; do + PATH="${PATH#:}" done # Then finally set up our path PATH="$desiredpath:$PATH"