fix projects plugin regression
This regression was introduced in ea2002a.
Before this commit, when the provided project was unique under all the
project paths, the command automatically change the directory to it.
Currently this is no more the case.
If there are many project paths set, then the project path menu is shown
at every call.
This PR solves this issue.
Signed-off-by: Eric Villard <dev@eviweb.fr>
pull/2138/head
parent
d1b831a92d
commit
088212fd32
|
|
@ -21,7 +21,7 @@ function pj() {
|
||||||
# with the same name in project directories
|
# with the same name in project directories
|
||||||
IFS=':' read -ra dests <<< "${BASH_IT_PROJECT_PATHS?${FUNCNAME[0]}: project working folders must be configured}"
|
IFS=':' read -ra dests <<< "${BASH_IT_PROJECT_PATHS?${FUNCNAME[0]}: project working folders must be configured}"
|
||||||
for d in "${!dests[@]}"; do
|
for d in "${!dests[@]}"; do
|
||||||
if [[ ! -d "${dests[d]}" ]]; then
|
if [[ ! -d "${dests[d]}/${proj}" ]]; then
|
||||||
unset 'dests[d]'
|
unset 'dests[d]'
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue