Remove Unused move_to_front_of_path
Function
In #440, a `move_to_front_of_path` function was introduced, but
was [ultimately not used][1] when these changes were merged as f7c73f7
.
The function itself was not removed, however.
This commit removes the unused function.
[1]: https://github.com/thoughtbot/dotfiles/pull/440#issuecomment-156549420
This commit is contained in:
parent
6cc0cb9302
commit
bd3c5daf7f
1 changed files with 0 additions and 10 deletions
|
@ -1,10 +0,0 @@
|
||||||
# Reorders existing entry in PATH to have it at the front
|
|
||||||
#
|
|
||||||
# move_to_front_of_path "$HOME/.bin"
|
|
||||||
#
|
|
||||||
move_to_front_of_path() {
|
|
||||||
if [[ ":$PATH:" == *":$1:"* ]]; then
|
|
||||||
PATH=$(echo $PATH | sed 's#'$1'##g' | sed s/:://g | sed s/:$//g | sed s/^://g)
|
|
||||||
PATH="$1${PATH:+":$PATH"}"
|
|
||||||
fi
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue