uinspath() --> uinspathm() et uinspathf() --> uinspath()

This commit is contained in:
Jephte CLAIN 2013-11-27 00:56:28 +04:00
parent 0f3b925527
commit 01cc0de8d7
1 changed files with 2 additions and 2 deletions

View File

@ -806,12 +806,12 @@ function uaddpath() {
local _qdir="${1//\//\\/}"
eval "export ${2:-PATH}; "'[ "${'"${2:-PATH}"'#$1:}" == "$'"${2:-PATH}"'" -a "${'"${2:-PATH}"'%:$1}" == "$'"${2:-PATH}"'" -a "${'"${2:-PATH}"'//:$_qdir:/:}" == "$'"${2:-PATH}"'" -a "$'"${2:-PATH}"'" != "$1" ] && '"${2:-PATH}"'="${'"${2:-PATH}"':+$'"${2:-PATH}"':}$1"'
}
function uinspath() {
function uinspathm() {
# Ajouter le chemin $1 au début, dans $2(=PATH), s'il n'y existe pas déjà
local _qdir="${1//\//\\/}"
eval "export ${2:-PATH}; "'[ "${'"${2:-PATH}"'#$1:}" == "$'"${2:-PATH}"'" -a "${'"${2:-PATH}"'%:$1}" == "$'"${2:-PATH}"'" -a "${'"${2:-PATH}"'//:$_qdir:/:}" == "$'"${2:-PATH}"'" -a "$'"${2:-PATH}"'" != "$1" ] && '"${2:-PATH}"'="$1${'"${2:-PATH}"':+:$'"${2:-PATH}"'}"'
}
function uinspathf() {
function uinspath() {
# S'assurer que le chemin $1 soit au début de $2(=PATH)
udelpath "$@"
uinstpath "$@"